The patch number 8025 was added via Mauro Carvalho Chehab <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Mauro Carvalho Chehab  <[EMAIL PROTECTED]>
Fix compilation with kernel 2.6.25




Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>


---

 linux/drivers/media/video/mt9m001.c |    4 ++++
 v4l/compat.h                        |    6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff -r 58b95134acb8 -r 04ddbe145932 linux/drivers/media/video/mt9m001.c
--- a/linux/drivers/media/video/mt9m001.c       Tue Jun 10 12:21:49 2008 -0300
+++ b/linux/drivers/media/video/mt9m001.c       Tue Jun 10 15:27:29 2008 -0300
@@ -694,11 +694,13 @@ static int mt9m001_remove(struct i2c_cli
        return 0;
 }
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
 static const struct i2c_device_id mt9m001_id[] = {
        { "mt9m001", 0 },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, mt9m001_id);
+#endif
 
 static struct i2c_driver mt9m001_i2c_driver = {
        .driver = {
@@ -706,7 +708,9 @@ static struct i2c_driver mt9m001_i2c_dri
        },
        .probe          = mt9m001_probe,
        .remove         = mt9m001_remove,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
        .id_table       = mt9m001_id,
+#endif
 };
 
 static int __init mt9m001_mod_init(void)
diff -r 58b95134acb8 -r 04ddbe145932 v4l/compat.h
--- a/v4l/compat.h      Tue Jun 10 12:21:49 2008 -0300
+++ b/v4l/compat.h      Tue Jun 10 15:27:29 2008 -0300
@@ -557,7 +557,11 @@ static inline struct proc_dir_entry *pro
        }
        return e;
 }
-
+#endif
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
+#ifdef CONFIG_PROC_FS
 static inline struct proc_dir_entry *proc_create_data(const char *a,
        mode_t b, struct proc_dir_entry *c, const struct file_operations *d,
        void *f)


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/04ddbe145932c88e64fd1a5991aaea56090d8d8a

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to