Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7b96dc023a1b487bce59256fde14b8bb28b45aea
Commit:     7b96dc023a1b487bce59256fde14b8bb28b45aea
Parent:     6050afbbb01d1f5a867f7839be6460bac801f5bc
Author:     Matthias Kaehlcke <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 17 19:40:31 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 19:40:31 2007 -0700

    [SPARC] Videopix Frame Grabber: Convert device_lock_sem to mutex
    
    Videopix Frame Grabber: Convert the semaphore device_lock_sem to the
    mutex API
    
    Signed-off-by: Matthias Kaehlcke <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 drivers/sbus/char/vfc.h     |    2 +-
 drivers/sbus/char/vfc_dev.c |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/sbus/char/vfc.h b/drivers/sbus/char/vfc.h
index 63941a2..f1aa138 100644
--- a/drivers/sbus/char/vfc.h
+++ b/drivers/sbus/char/vfc.h
@@ -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;
diff --git a/drivers/sbus/char/vfc_dev.c b/drivers/sbus/char/vfc_dev.c
index 9269f7f..e7a1642 100644
--- a/drivers/sbus/char/vfc_dev.c
+++ b/drivers/sbus/char/vfc_dev.c
@@ -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);
 }
 
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to