aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-sf16fmr2.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-sf16fmr2.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-sf16fmr2.c')
-rw-r--r--drivers/media/radio/radio-sf16fmr2.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c
index 099ffb3b9c71..bcebd8cb19ad 100644
--- a/drivers/media/radio/radio-sf16fmr2.c
+++ b/drivers/media/radio/radio-sf16fmr2.c
@@ -19,9 +19,9 @@
19#include <asm/io.h> /* outb, outb_p */ 19#include <asm/io.h> /* outb, outb_p */
20#include <asm/uaccess.h> /* copy to/from user */ 20#include <asm/uaccess.h> /* copy to/from user */
21#include <linux/videodev.h> /* kernel radio structs */ 21#include <linux/videodev.h> /* kernel radio structs */
22#include <asm/semaphore.h> 22#include <linux/mutex.h>
23 23
24static struct semaphore lock; 24static struct mutex lock;
25 25
26#undef DEBUG 26#undef DEBUG
27//#define DEBUG 1 27//#define DEBUG 1
@@ -238,9 +238,9 @@ static int fmr2_do_ioctl(struct inode *inode, struct file *file,
238 if (fmr2->mute) 238 if (fmr2->mute)
239 v->flags |= VIDEO_AUDIO_MUTE; 239 v->flags |= VIDEO_AUDIO_MUTE;
240 v->mode=VIDEO_MODE_AUTO; 240 v->mode=VIDEO_MODE_AUTO;
241 down(&lock); 241 mutex_lock(&lock);
242 v->signal = fmr2_getsigstr(fmr2); 242 v->signal = fmr2_getsigstr(fmr2);
243 up(&lock); 243 mutex_unlock(&lock);
244 return 0; 244 return 0;
245 } 245 }
246 case VIDIOCSTUNER: 246 case VIDIOCSTUNER:
@@ -274,9 +274,9 @@ static int fmr2_do_ioctl(struct inode *inode, struct file *file,
274 /* set card freq (if not muted) */ 274 /* set card freq (if not muted) */
275 if (fmr2->curvol && !fmr2->mute) 275 if (fmr2->curvol && !fmr2->mute)
276 { 276 {
277 down(&lock); 277 mutex_lock(&lock);
278 fmr2_setfreq(fmr2); 278 fmr2_setfreq(fmr2);
279 up(&lock); 279 mutex_unlock(&lock);
280 } 280 }
281 return 0; 281 return 0;
282 } 282 }
@@ -318,14 +318,14 @@ static int fmr2_do_ioctl(struct inode *inode, struct file *file,
318 else 318 else
319 printk(KERN_DEBUG "mute\n"); 319 printk(KERN_DEBUG "mute\n");
320#endif 320#endif
321 down(&lock); 321 mutex_lock(&lock);
322 if (fmr2->curvol && !fmr2->mute) 322 if (fmr2->curvol && !fmr2->mute)
323 { 323 {
324 fmr2_setvolume(fmr2); 324 fmr2_setvolume(fmr2);
325 fmr2_setfreq(fmr2); 325 fmr2_setfreq(fmr2);
326 } 326 }
327 else fmr2_mute(fmr2->port); 327 else fmr2_mute(fmr2->port);
328 up(&lock); 328 mutex_unlock(&lock);
329 return 0; 329 return 0;
330 } 330 }
331 case VIDIOCGUNIT: 331 case VIDIOCGUNIT:
@@ -380,7 +380,7 @@ static int __init fmr2_init(void)
380 fmr2_unit.card_type = 0; 380 fmr2_unit.card_type = 0;
381 fmr2_radio.priv = &fmr2_unit; 381 fmr2_radio.priv = &fmr2_unit;
382 382
383 init_MUTEX(&lock); 383 mutex_init(&lock);
384 384
385 if (request_region(io, 2, "sf16fmr2")) 385 if (request_region(io, 2, "sf16fmr2"))
386 { 386 {
@@ -397,10 +397,10 @@ static int __init fmr2_init(void)
397 printk(KERN_INFO "SF16FMR2 radio card driver at 0x%x.\n", io); 397 printk(KERN_INFO "SF16FMR2 radio card driver at 0x%x.\n", io);
398 debug_print((KERN_DEBUG "Mute %d Low %d\n",VIDEO_AUDIO_MUTE,VIDEO_TUNER_LOW)); 398 debug_print((KERN_DEBUG "Mute %d Low %d\n",VIDEO_AUDIO_MUTE,VIDEO_TUNER_LOW));
399 /* mute card - prevents noisy bootups */ 399 /* mute card - prevents noisy bootups */
400 down(&lock); 400 mutex_lock(&lock);
401 fmr2_mute(io); 401 fmr2_mute(io);
402 fmr2_product_info(&fmr2_unit); 402 fmr2_product_info(&fmr2_unit);
403 up(&lock); 403 mutex_unlock(&lock);
404 debug_print((KERN_DEBUG "card_type %d\n", fmr2_unit.card_type)); 404 debug_print((KERN_DEBUG "card_type %d\n", fmr2_unit.card_type));
405 return 0; 405 return 0;
406} 406}