#include <asm/io.h> /* outb, outb_p */
#include <asm/uaccess.h> /* copy to/from user */
#include <linux/videodev.h> /* kernel radio structs */
-#include <linux/mutex.h>
+#include <asm/semaphore.h>
-static struct mutex lock;
+static struct semaphore lock;
#undef DEBUG
//#define DEBUG 1
if (fmr2->mute)
v->flags |= VIDEO_AUDIO_MUTE;
v->mode=VIDEO_MODE_AUTO;
- mutex_lock(&lock);
+ down(&lock);
v->signal = fmr2_getsigstr(fmr2);
- mutex_unlock(&lock);
+ up(&lock);
return 0;
}
case VIDIOCSTUNER:
/* set card freq (if not muted) */
if (fmr2->curvol && !fmr2->mute)
{
- mutex_lock(&lock);
+ down(&lock);
fmr2_setfreq(fmr2);
- mutex_unlock(&lock);
+ up(&lock);
}
return 0;
}
else
printk(KERN_DEBUG "mute\n");
#endif
- mutex_lock(&lock);
+ down(&lock);
if (fmr2->curvol && !fmr2->mute)
{
fmr2_setvolume(fmr2);
fmr2_setfreq(fmr2);
}
else fmr2_mute(fmr2->port);
- mutex_unlock(&lock);
+ up(&lock);
return 0;
}
case VIDIOCGUNIT:
fmr2_unit.card_type = 0;
fmr2_radio.priv = &fmr2_unit;
- mutex_init(&lock);
+ init_MUTEX(&lock);
if (request_region(io, 2, "sf16fmr2"))
{
printk(KERN_INFO "SF16FMR2 radio card driver at 0x%x.\n", io);
debug_print((KERN_DEBUG "Mute %d Low %d\n",VIDEO_AUDIO_MUTE,VIDEO_TUNER_LOW));
/* mute card - prevents noisy bootups */
- mutex_lock(&lock);
+ down(&lock);
fmr2_mute(io);
fmr2_product_info(&fmr2_unit);
- mutex_unlock(&lock);
+ up(&lock);
debug_print((KERN_DEBUG "card_type %d\n", fmr2_unit.card_type));
return 0;
}