#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 radio_nr = -1;
/* hw precision is 12.5 kHz
- * It is only usefull to give freq in intervall of 200 (=0.0125Mhz),
+ * It is only useful to give freq in intervall of 200 (=0.0125Mhz),
* other bits will be truncated
*/
#define RSF16_ENCODE(x) ((x)/200+856)
#define RSF16_MINFREQ 87*16000
#define RSF16_MAXFREQ 108*16000
-/* from radio-aimslab */
-static void sleep_delay(unsigned long n)
-{
- unsigned d=n/(1000000U/HZ);
- if (!d)
- udelay(n);
- else
- {
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout(d);
- }
-}
-
static inline void wait(int n,int port)
{
for (;n;--n) inb(port);
fmr2_unmute(port);
/* wait 0.11 sec */
- sleep_delay(110000LU);
+ msleep(110);
/* NOTE if mute this stop radio
you must set freq on unmute */
.open = video_exclusive_open,
.release = video_exclusive_release,
.ioctl = fmr2_ioctl,
+ .compat_ioctl = v4l_compat_ioctl32,
.llseek = no_llseek,
};
MODULE_DESCRIPTION("A driver for the SF16FMR2 radio.");
MODULE_LICENSE("GPL");
-MODULE_PARM(io, "i");
+module_param(io, int, 0);
MODULE_PARM_DESC(io, "I/O address of the SF16FMR2 card (should be 0x384, if do not work try 0x284)");
-MODULE_PARM(radio_nr, "i");
+module_param(radio_nr, int, 0);
static void __exit fmr2_cleanup_module(void)
{