Update of /cvsroot/alsa/alsa-driver/i2c/other
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv432

Modified Files:
        Makefile 
Added Files:
        tea575x-tuner.patch 
Removed Files:
        tea575x-tuner.c 
Log Message:
Hacks to make 2.6 code clean

--- NEW FILE: tea575x-tuner.patch ---
--- tea575x-tuner.c.old 2004-01-29 13:36:27.000000000 +0100
+++ tea575x-tuner.c     2004-01-29 13:35:29.000000000 +0100
@@ -85,10 +85,27 @@
  * Linux Video interface
  */
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
+static int snd_tea575x_open(struct video_device *dev, int flags)
+{
+       return 0;
+}
+
+static void snd_tea575x_close(struct video_device *dev)
+{
+}
+#endif
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0)
 static int snd_tea575x_do_ioctl(struct inode *inode, struct file *file,
                                unsigned int cmd, void *arg)
+#else
+static int snd_tea575x_ioctl(struct video_device *dev, unsigned int cmd, void *arg)
+#endif
 {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0)
        struct video_device *dev = video_devdata(file);
+#endif
        tea575x_t *tea = video_get_drvdata(dev);
        
        switch(cmd) {
@@ -167,11 +184,13 @@
        }
 }
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0)
 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);
 }
+#endif
 
 /*
  * initialize all the tea575x chips
@@ -192,11 +211,17 @@
        tea->vd.type = VID_TYPE_TUNER;
        tea->vd.hardware = VID_HARDWARE_RTRACK; /* FIXME: assign new number */
        video_set_drvdata(&tea->vd, tea);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)
+       tea->vd.open = snd_tea575x_open;
+       tea->vd.close = snd_tea575x_close;
+       tea->vd.ioctl = snd_tea575x_ioctl;
+#else
        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;
+#endif
        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;

Index: Makefile
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/i2c/other/Makefile,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Makefile    28 Jan 2004 18:43:15 -0000      1.5
+++ Makefile    29 Jan 2004 12:48:24 -0000      1.6
@@ -5,6 +5,8 @@
 include $(SND_TOPDIR)/toplevel.config
 include $(SND_TOPDIR)/Makefile.conf
 
+clean-files := tea575x-tuner.c
+
 # Hack for FM801 && TEA575x
 ifeq (y,$(CONFIG_VIDEO_DEV))
 ifeq (m,$(CONFIG_SND_FM801))
@@ -24,3 +26,5 @@
 include $(SND_TOPDIR)/alsa-kernel/i2c/other/Makefile
 
 include $(SND_TOPDIR)/Rules.make
+
+tea575x-tuner.c: tea575x-tuner.patch 
$(SND_TOPDIR)/alsa-kernel/i2c/other/tea575x-tuner.c

--- tea575x-tuner.c DELETED ---



-------------------------------------------------------
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

Reply via email to