* lowlevel part
*/
-static void snd_tea575x_set_freq(tea575x_t *tea)
+static void snd_tea575x_set_freq(struct snd_tea575x *tea)
{
unsigned long freq;
* 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:
}
}
-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;
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;
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);