#include <linux/sched.h>
#include <asm/io.h>
#include <asm/uaccess.h>
-#include <linux/mutex.h>
+#include <asm/semaphore.h>
#include <linux/pci.h>
#include <linux/videodev.h>
-
#define DRIVER_VERSION "0.05"
#define GPIO_DATA 0x60 /* port offset from ESS_IO_BASE */
muted, /* VIDEO_AUDIO_MUTE */
stereo, /* VIDEO_TUNER_STEREO_ON */
tuned; /* signal strength (0 or 0xffff) */
- struct mutex lock;
+ struct semaphore lock;
};
static u32 radio_bits_get(struct radio_device *dev)
struct radio_device *card = video_get_drvdata(dev);
int ret;
- mutex_lock(&card->lock);
+ down(&card->lock);
ret = video_usercopy(inode, file, cmd, arg, radio_function);
- mutex_unlock(&card->lock);
+ up(&card->lock);
return ret;
}
}
radio_unit->io = pci_resource_start(pdev, 0) + GPIO_DATA;
- mutex_init(&radio_unit->lock);
+ init_MUTEX(&radio_unit->lock);
maestro_radio_inst = video_device_alloc();
if (maestro_radio_inst == NULL) {