]> err.no Git - linux-2.6/blobdiff - drivers/media/dvb/bt8xx/bt878.h
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6] / drivers / media / dvb / bt8xx / bt878.h
index 9faf93770d08f3e5c6cdd3ddf2b70d86eaa17b20..375fd2892a11098bd01ec2253436e4a53affabfc 100644 (file)
@@ -25,6 +25,8 @@
 #include <linux/pci.h>
 #include <linux/sched.h>
 #include <linux/spinlock.h>
+#include <linux/mutex.h>
+
 #include "bt848.h"
 #include "bttv.h"
 
 #define BTTV_BOARD_DVICO_DVBT_LITE         0x80
 #define BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE 0x87
 
-struct cards {
-       __u32 pci_id;
-       __u16 card_id;
-       char  *name;
-};
-
 extern int bt878_num;
 
 struct bt878 {
-       struct semaphore  gpio_lock;
+       struct mutex gpio_lock;
        unsigned int nr;
        unsigned int bttv_nr;
        struct i2c_adapter *adapter;
@@ -147,11 +143,10 @@ void bt878_start(struct bt878 *bt, u32 controlreg, u32 op_sync_orin,
 void bt878_stop(struct bt878 *bt);
 
 #if defined(__powerpc__)       /* big-endian */
-extern __inline__ void io_st_le32(volatile unsigned __iomem *addr, unsigned val)
+static inline void io_st_le32(volatile unsigned __iomem *addr, unsigned val)
 {
-       __asm__ __volatile__("stwbrx %1,0,%2":"=m"(*addr):"r"(val),
-                            "r"(addr));
-       __asm__ __volatile__("eieio":::"memory");
+       st_le32(addr, val);
+       eieio();
 }
 
 #define bmtwrite(dat,adr)  io_st_le32((adr),(dat))