mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Videopix Frame Grabber: Convert device_lock_sem to mutex
@ 2007-10-16 17:18 Matthias Kaehlcke
  2007-10-18  2:40 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Kaehlcke @ 2007-10-16 17:18 UTC (permalink / raw)
  To: davem; +Cc: linux-kernel, akpm

Videopix Frame Grabber: Convert the semaphore device_lock_sem to the
mutex API

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>

--

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);
 }

-- 
Matthias Kaehlcke
Linux Application Developer
Barcelona

             If liberty means anything at all, it means the
           right to tell people what they do not want to hear
                            (George Orwell)
                                                                 .''`.
    using free software / Debian GNU/Linux | http://debian.org  : :'  :
                                                                `. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4                  `-

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Videopix Frame Grabber: Convert device_lock_sem to mutex
  2007-10-16 17:18 [PATCH] Videopix Frame Grabber: Convert device_lock_sem to mutex Matthias Kaehlcke
@ 2007-10-18  2:40 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-10-18  2:40 UTC (permalink / raw)
  To: matthias.kaehlcke; +Cc: linux-kernel, akpm

From: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Date: Tue, 16 Oct 2007 19:18:52 +0200

> Videopix Frame Grabber: Convert the semaphore device_lock_sem to the
> mutex API
> 
> Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-10-18  2:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-16 17:18 [PATCH] Videopix Frame Grabber: Convert device_lock_sem to mutex Matthias Kaehlcke
2007-10-18  2:40 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®