aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-maxiradio.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-02-07 03:49:14 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-02-07 03:49:14 -0500
commit3593cab5d62c4c7abced1076710f9bc2d8847433 (patch)
treedd5dc21961f6b4aef6900b0c2eb63ce7c70aecd5 /drivers/media/radio/radio-maxiradio.c
parent538f9630afbbe429ecbcdcf92536200293a8e4b3 (diff)
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-maxiradio.c')
-rw-r--r--drivers/media/radio/radio-maxiradio.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/media/radio/radio-maxiradio.c b/drivers/media/radio/radio-maxiradio.c
index c975ddd86cd5..f0bf47bcb64c 100644
--- a/drivers/media/radio/radio-maxiradio.c
+++ b/drivers/media/radio/radio-maxiradio.c
@@ -37,7 +37,8 @@
37#include <linux/sched.h> 37#include <linux/sched.h>
38#include <asm/io.h> 38#include <asm/io.h>
39#include <asm/uaccess.h> 39#include <asm/uaccess.h>
40#include <asm/semaphore.h> 40#include <linux/mutex.h>
41
41#include <linux/pci.h> 42#include <linux/pci.h>
42#include <linux/videodev.h> 43#include <linux/videodev.h>
43 44
@@ -101,7 +102,7 @@ static struct radio_device
101 102
102 unsigned long freq; 103 unsigned long freq;
103 104
104 struct semaphore lock; 105 struct mutex lock;
105} radio_unit = {0, 0, 0, 0, }; 106} radio_unit = {0, 0, 0, 0, };
106 107
107 108
@@ -267,9 +268,9 @@ static int radio_ioctl(struct inode *inode, struct file *file,
267 struct radio_device *card=dev->priv; 268 struct radio_device *card=dev->priv;
268 int ret; 269 int ret;
269 270
270 down(&card->lock); 271 mutex_lock(&card->lock);
271 ret = video_usercopy(inode, file, cmd, arg, radio_function); 272 ret = video_usercopy(inode, file, cmd, arg, radio_function);
272 up(&card->lock); 273 mutex_unlock(&card->lock);
273 return ret; 274 return ret;
274} 275}
275 276
@@ -290,7 +291,7 @@ static int __devinit maxiradio_init_one(struct pci_dev *pdev, const struct pci_d
290 goto err_out_free_region; 291 goto err_out_free_region;
291 292
292 radio_unit.io = pci_resource_start(pdev, 0); 293 radio_unit.io = pci_resource_start(pdev, 0);
293 init_MUTEX(&radio_unit.lock); 294 mutex_init(&radio_unit.lock);
294 maxiradio_radio.priv = &radio_unit; 295 maxiradio_radio.priv = &radio_unit;
295 296
296 if(video_register_device(&maxiradio_radio, VFL_TYPE_RADIO, radio_nr)==-1) { 297 if(video_register_device(&maxiradio_radio, VFL_TYPE_RADIO, radio_nr)==-1) {