#include <linux/module.h> /* Modules */
#include <linux/init.h> /* Initdata */
-#include <linux/ioport.h> /* check_region, request_region */
+#include <linux/ioport.h> /* request_region */
#include <linux/delay.h> /* udelay */
#include <asm/io.h> /* outb, outb_p */
#include <asm/uaccess.h> /* copy to/from user */
static int tunestat=0;
static int sigstrength=0;
static wait_queue_head_t read_queue;
-struct timer_list tunertimer,rdstimer,readtimer;
+static struct timer_list readtimer;
static __u8 rdsin=0,rdsout=0,rdsstat=0;
static unsigned char rdsbuf[RDS_BUFFER];
static spinlock_t cadet_io_lock;
outb(inb(io+1)&0x7f,io+1); /* Reset RDS detection */
spin_unlock(&cadet_io_lock);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(HZ/10);
+ msleep(100);
spin_lock(&cadet_io_lock);
outb(3,io); /* Select Decoder Control/Status */
outb(curvol,io+1);
spin_unlock(&cadet_io_lock);
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(HZ/10);
+ msleep(100);
cadet_gettune();
if((tunestat & 0x40) == 0) { /* Tuned */
spin_unlock(&cadet_io_lock);
}
-void cadet_handler(unsigned long data)
+static void cadet_handler(unsigned long data)
{
/*
* Service the RDS fifo
.release = cadet_release,
.read = cadet_read,
.ioctl = cadet_ioctl,
+ .compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};
for(i=0;i<8;i++) {
io=iovals[i];
- if(request_region(io,2, "cadet-probe")>=0) {
+ if (request_region(io, 2, "cadet-probe")) {
cadet_setfreq(1410);
if(cadet_getfreq()==1410) {
release_region(io, 2);
MODULE_DESCRIPTION("A driver for the ADS Cadet AM/FM/RDS radio card.");
MODULE_LICENSE("GPL");
-MODULE_PARM(io, "i");
+module_param(io, int, 0);
MODULE_PARM_DESC(io, "I/O address of Cadet card (0x330,0x332,0x334,0x336,0x338,0x33a,0x33c,0x33e)");
-MODULE_PARM(radio_nr, "i");
+module_param(radio_nr, int, 0);
static void __exit cadet_cleanup_module(void)
{