aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-sf16fmr2.c
diff options
context:
space:
mode:
authorJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-03-21 14:05:45 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-03-21 14:05:45 -0500
commitd04cdb64212eb5ae6a98026a97dda626e40e8e9a (patch)
treeb6a7dbb21ccfceb915844e9a330b3d3dfcaf3c5b /drivers/media/radio/radio-sf16fmr2.c
parent2f8600dff2b140096a7df781884e918a16aa90e0 (diff)
parentec1248e70edc5cf7b485efcc7b41e44e10f422e5 (diff)
Merge ../linux-2.6
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}