diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-02-07 06:49:14 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-02-07 06:49:14 -0200 |
commit | 3593cab5d62c4c7abced1076710f9bc2d8847433 (patch) | |
tree | dd5dc21961f6b4aef6900b0c2eb63ce7c70aecd5 /drivers/media/radio/radio-maestro.c | |
parent | 538f9630afbbe429ecbcdcf92536200293a8e4b3 (diff) | |
download | talos-obmc-linux-3593cab5d62c4c7abced1076710f9bc2d8847433.tar.gz talos-obmc-linux-3593cab5d62c4c7abced1076710f9bc2d8847433.zip |
V4L/DVB (3318b): sem2mutex: drivers/media/, #2
Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/radio/radio-maestro.c')
-rw-r--r-- | drivers/media/radio/radio-maestro.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/media/radio/radio-maestro.c b/drivers/media/radio/radio-maestro.c index 36c9f5bf8cdd..39c1d9118636 100644 --- a/drivers/media/radio/radio-maestro.c +++ b/drivers/media/radio/radio-maestro.c @@ -23,10 +23,11 @@ #include <linux/sched.h> #include <asm/io.h> #include <asm/uaccess.h> -#include <asm/semaphore.h> +#include <linux/mutex.h> #include <linux/pci.h> #include <linux/videodev.h> + #define DRIVER_VERSION "0.05" #define GPIO_DATA 0x60 /* port offset from ESS_IO_BASE */ @@ -104,7 +105,7 @@ struct radio_device { muted, /* VIDEO_AUDIO_MUTE */ stereo, /* VIDEO_TUNER_STEREO_ON */ tuned; /* signal strength (0 or 0xffff) */ - struct semaphore lock; + struct mutex lock; }; static u32 radio_bits_get(struct radio_device *dev) @@ -258,9 +259,9 @@ static int radio_ioctl(struct inode *inode, struct file *file, struct radio_device *card = video_get_drvdata(dev); int ret; - down(&card->lock); + mutex_lock(&card->lock); ret = video_usercopy(inode, file, cmd, arg, radio_function); - up(&card->lock); + mutex_unlock(&card->lock); return ret; } @@ -311,7 +312,7 @@ static int __devinit maestro_probe(struct pci_dev *pdev, } radio_unit->io = pci_resource_start(pdev, 0) + GPIO_DATA; - init_MUTEX(&radio_unit->lock); + mutex_init(&radio_unit->lock); maestro_radio_inst = video_device_alloc(); if (maestro_radio_inst == NULL) { |