Update of /cvsroot/alsa/alsa-kernel/i2c/other In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32733/i2c/other
Modified Files: tea575x-tuner.c Log Message: TEA575x code is now 2.6 videodev compatible Index: tea575x-tuner.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/i2c/other/tea575x-tuner.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- tea575x-tuner.c 28 Jan 2004 18:42:24 -0000 1.1 +++ tea575x-tuner.c 29 Jan 2004 12:47:31 -0000 1.2 @@ -85,18 +85,11 @@ * Linux Video interface */ -static int snd_tea575x_open(struct video_device *dev, int flags) +static int snd_tea575x_do_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, void *arg) { - return 0; -} - -static void snd_tea575x_close(struct video_device *dev) -{ -} - -static int snd_tea575x_ioctl(struct video_device *dev, unsigned int cmd, void *arg) -{ - tea575x_t *tea = dev->priv; + struct video_device *dev = video_devdata(file); + tea575x_t *tea = video_get_drvdata(dev); switch(cmd) { case VIDIOCGCAP: @@ -174,6 +167,12 @@ } } +static int snd_tea575x_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) +{ + return video_usercopy(inode, file, cmd, arg, snd_tea575x_do_ioctl); +} + /* * initialize all the tea575x chips */ @@ -192,10 +191,12 @@ 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.open = snd_tea575x_open; - tea->vd.close = snd_tea575x_close; - tea->vd.ioctl = snd_tea575x_ioctl; - tea->vd.priv = tea; + video_set_drvdata(&tea->vd, tea); + tea->vd.fops = &tea->fops; + tea->fops.owner = tea->card->module; + tea->fops.open = video_exclusive_open; + tea->fops.release = video_exclusive_release; + tea->fops.ioctl = snd_tea575x_ioctl; if (video_register_device(&tea->vd, VFL_TYPE_RADIO, tea->dev_nr - 1) < 0) { snd_printk(KERN_ERR "unable to register tea575x tuner\n"); return; ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog