linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / media / radio / radio-maxiradio.c
index c2fa20d..c975ddd 100644 (file)
@@ -57,7 +57,7 @@
 static const int clk = 1, data = 2, wren = 4, mo_st = 8, power = 16 ;
 
 static int radio_nr = -1;
-MODULE_PARM(radio_nr, "i");
+module_param(radio_nr, int, 0);
 
 
 #define FREQ_LO                 50*16000
@@ -80,6 +80,7 @@ static struct file_operations maxiradio_fops = {
        .open           = video_exclusive_open,
        .release        = video_exclusive_release,
        .ioctl          = radio_ioctl,
+       .compat_ioctl   = v4l_compat_ioctl32,
        .llseek         = no_llseek,
 };
 static struct video_device maxiradio_radio =
@@ -104,13 +105,6 @@ static struct radio_device
 } radio_unit = {0, 0, 0, 0, };
 
 
-static void sleep_125ms(void)
-{
-       current->state = TASK_INTERRUPTIBLE;
-       schedule_timeout(HZ >> 3);
-}
-
-
 static void outbit(unsigned long bit, __u16 io)
 {
        if(bit != 0)
@@ -173,7 +167,7 @@ static int get_tune(__u16 io)
 }
 
 
-inline static int radio_function(struct inode *inode, struct file *file,
+static inline int radio_function(struct inode *inode, struct file *file,
                                 unsigned int cmd, void *arg)
 {
        struct video_device *dev = video_devdata(file);
@@ -228,7 +222,7 @@ inline static int radio_function(struct inode *inode, struct file *file,
                                return -EINVAL;
                        card->freq = *freq;
                        set_freq(card->io, FREQ2BITS(card->freq));
-                       sleep_125ms();
+                       msleep(125);
                        return 0;
                }
                case VIDIOCGAUDIO: {    
@@ -342,12 +336,12 @@ static struct pci_driver maxiradio_driver = {
        .remove         = __devexit_p(maxiradio_remove_one),
 };
 
-int __init maxiradio_radio_init(void)
+static int __init maxiradio_radio_init(void)
 {
-       return pci_module_init(&maxiradio_driver);
+       return pci_register_driver(&maxiradio_driver);
 }
 
-void __exit maxiradio_radio_exit(void)
+static void __exit maxiradio_radio_exit(void)
 {
        pci_unregister_driver(&maxiradio_driver);
 }