Videopix Frame Grabber: Convert device_lock_sem to mutex
PATCH 1/1 Videopix Frame Grabber: Convert device_lock_sem to mutex
Videopix Frame Grabber: Convert the semaphore device_lock_sem to the mutex API
--
drivers/sbus/char/vfc.h +1 -1
@@ -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;
drivers/sbus/char/vfc_dev.c +3 -3
@@ -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 `-
From: Matthias Kaehlcke <[email protected]>
Date: Tue, 16 Oct 2007 19:18:52 +0200
Quoted 4 lines
Videopix Frame Grabber: Convert the semaphore
device_lock_semto the mutex APISigned-off-by Matthias Kaehlcke <[email protected]>
Applied, thanks.