[SPARC] Videopix Frame Grabber: Convert device_lock_sem to mutex
authorMatthias Kaehlcke <matthias.kaehlcke@gmail.com>
Thu, 18 Oct 2007 02:40:31 +0000 (19:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Oct 2007 02:40:31 +0000 (19:40 -0700)
Videopix Frame Grabber: Convert the semaphore device_lock_sem to the
mutex API

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/sbus/char/vfc.h
drivers/sbus/char/vfc_dev.c

index 63941a259b927436f2f96e7589d8e8267e48ffa9..f1aa1389ea4ac231866310a92e2cbd625fef6a7c 100644 (file)
@@ -126,7 +126,7 @@ struct vfc_dev {
        volatile struct vfc_regs __iomem *regs;
        struct vfc_regs *phys_regs;
        unsigned int control_reg;
-       struct semaphore device_lock_sem;
+       struct mutex device_lock_mtx;
        int instance;
        int busy;
        unsigned long which_io;
index 9269f7fbd36364957f0cdc97a90357f4e987fd1f..e7a1642b2aa4c528baa0aa4f1bf85f6f970fe6ce 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/fs.h>
 #include <linux/delay.h>
 #include <linux/spinlock.h>
+#include <linux/mutex.h>
 #include <linux/mm.h>
 
 #include <asm/openprom.h>
@@ -54,12 +55,12 @@ static unsigned char saa9051_init_array[VFC_SAA9051_NR] = {
 
 void vfc_lock_device(struct vfc_dev *dev)
 {
-       down(&dev->device_lock_sem);
+       mutex_lock(&dev->device_lock_mtx);
 }
 
 void vfc_unlock_device(struct vfc_dev *dev)
 {
-       up(&dev->device_lock_sem);
+       mutex_unlock(&dev->device_lock_mtx);
 }