aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-maestro.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-maestro.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-maestro.c')
-rw-r--r--drivers/media/radio/radio-maestro.c11
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 @@
23#include <linux/sched.h> 23#include <linux/sched.h>
24#include <asm/io.h> 24#include <asm/io.h>
25#include <asm/uaccess.h> 25#include <asm/uaccess.h>
26#include <asm/semaphore.h> 26#include <linux/mutex.h>
27#include <linux/pci.h> 27#include <linux/pci.h>
28#include <linux/videodev.h> 28#include <linux/videodev.h>
29 29
30
30#define DRIVER_VERSION "0.05" 31#define DRIVER_VERSION "0.05"
31 32
32#define GPIO_DATA 0x60 /* port offset from ESS_IO_BASE */ 33#define GPIO_DATA 0x60 /* port offset from ESS_IO_BASE */
@@ -104,7 +105,7 @@ struct radio_device {
104 muted, /* VIDEO_AUDIO_MUTE */ 105 muted, /* VIDEO_AUDIO_MUTE */
105 stereo, /* VIDEO_TUNER_STEREO_ON */ 106 stereo, /* VIDEO_TUNER_STEREO_ON */
106 tuned; /* signal strength (0 or 0xffff) */ 107 tuned; /* signal strength (0 or 0xffff) */
107 struct semaphore lock; 108 struct mutex lock;
108}; 109};
109 110
110static u32 radio_bits_get(struct radio_device *dev) 111static u32 radio_bits_get(struct radio_device *dev)
@@ -258,9 +259,9 @@ static int radio_ioctl(struct inode *inode, struct file *file,
258 struct radio_device *card = video_get_drvdata(dev); 259 struct radio_device *card = video_get_drvdata(dev);
259 int ret; 260 int ret;
260 261
261 down(&card->lock); 262 mutex_lock(&card->lock);
262 ret = video_usercopy(inode, file, cmd, arg, radio_function); 263 ret = video_usercopy(inode, file, cmd, arg, radio_function);
263 up(&card->lock); 264 mutex_unlock(&card->lock);
264 265
265 return ret; 266 return ret;
266} 267}
@@ -311,7 +312,7 @@ static int __devinit maestro_probe(struct pci_dev *pdev,
311 } 312 }
312 313
313 radio_unit->io = pci_resource_start(pdev, 0) + GPIO_DATA; 314 radio_unit->io = pci_resource_start(pdev, 0) + GPIO_DATA;
314 init_MUTEX(&radio_unit->lock); 315 mutex_init(&radio_unit->lock);
315 316
316 maestro_radio_inst = video_device_alloc(); 317 maestro_radio_inst = video_device_alloc();
317 if (maestro_radio_inst == NULL) { 318 if (maestro_radio_inst == NULL) {