Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / sound / i2c / other / tea575x-tuner.c
index 7b9f3ea..4c2fd14 100644 (file)
@@ -58,7 +58,7 @@ MODULE_LICENSE("GPL");
  * lowlevel part
  */
 
-static void snd_tea575x_set_freq(tea575x_t *tea)
+static void snd_tea575x_set_freq(struct snd_tea575x *tea)
 {
        unsigned long freq;
 
@@ -85,11 +85,12 @@ static void snd_tea575x_set_freq(tea575x_t *tea)
  * Linux Video interface
  */
 
-static int snd_tea575x_do_ioctl(struct inode *inode, struct file *file,
-                               unsigned int cmd, void *arg)
+static int snd_tea575x_ioctl(struct inode *inode, struct file *file,
+                            unsigned int cmd, unsigned long data)
 {
        struct video_device *dev = video_devdata(file);
-       tea575x_t *tea = video_get_drvdata(dev);
+       struct snd_tea575x *tea = video_get_drvdata(dev);
+       void __user *arg = (void __user *)data;
        
        switch(cmd) {
                case VIDIOCGCAP:
@@ -167,16 +168,14 @@ static int snd_tea575x_do_ioctl(struct inode *inode, struct file *file,
        }
 }
 
-static int snd_tea575x_ioctl(struct inode *inode, struct file *file,
-                            unsigned int cmd, unsigned long arg)
+static void snd_tea575x_release(struct video_device *vfd)
 {
-       return video_usercopy(inode, file, cmd, arg, snd_tea575x_do_ioctl);
 }
 
 /*
  * initialize all the tea575x chips
  */
-void snd_tea575x_init(tea575x_t *tea)
+void snd_tea575x_init(struct snd_tea575x *tea)
 {
        unsigned int val;
 
@@ -191,6 +190,7 @@ void snd_tea575x_init(tea575x_t *tea)
        strcpy(tea->vd.name, tea->tea5759 ? "TEA5759 radio" : "TEA5757 radio");
        tea->vd.type = VID_TYPE_TUNER;
        tea->vd.hardware = VID_HARDWARE_RTRACK; /* FIXME: assign new number */
+       tea->vd.release = snd_tea575x_release;
        video_set_drvdata(&tea->vd, tea);
        tea->vd.fops = &tea->fops;
        tea->fops.owner = tea->card->module;
@@ -209,7 +209,7 @@ void snd_tea575x_init(tea575x_t *tea)
        snd_tea575x_set_freq(tea);
 }
 
-void snd_tea575x_exit(tea575x_t *tea)
+void snd_tea575x_exit(struct snd_tea575x *tea)
 {
        if (tea->vd_registered) {
                video_unregister_device(&tea->vd);