diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-15 12:10:16 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-15 12:10:16 -0300 |
commit | 01af721cf6a5ae1cf5b84bded6d73cdac00b4f8b (patch) | |
tree | 27b4957fcc95a61bb25c6d5830186c7e3030bbf9 /linux/drivers/media | |
parent | edc73d98e1fc219ff5fbf00eb21937fa2945cd16 (diff) | |
download | mediapointer-dvb-s2-01af721cf6a5ae1cf5b84bded6d73cdac00b4f8b.tar.gz mediapointer-dvb-s2-01af721cf6a5ae1cf5b84bded6d73cdac00b4f8b.tar.bz2 |
Fix compilation on 2.6.16
From: Sigmund Augdal Helberg <sigmund@snap.tv>
The following patch fixes compilation of tea6420.c, tea6415c.c and
tda9840.c. These failed to build because of changes to struct i2c_driver
in 2.6.16. The changes are identical for all three files and are
inspierd by saa7115.c
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/tda9840.c | 12 | ||||
-rw-r--r-- | linux/drivers/media/video/tea6415c.c | 12 | ||||
-rw-r--r-- | linux/drivers/media/video/tea6420.c | 12 |
3 files changed, 33 insertions, 3 deletions
diff --git a/linux/drivers/media/video/tda9840.c b/linux/drivers/media/video/tda9840.c index f39e4f54c..9cc13ec8e 100644 --- a/linux/drivers/media/video/tda9840.c +++ b/linux/drivers/media/video/tda9840.c @@ -24,6 +24,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "compat.h" + #include <linux/module.h> #include <linux/ioctl.h> #include <linux/i2c.h> @@ -221,10 +223,18 @@ static int detach(struct i2c_client *client) } static struct i2c_driver driver = { +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) &&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) .owner = THIS_MODULE, +#endif +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .name = "tda9840", - .id = I2C_DRIVERID_TDA9840, .flags = I2C_DF_NOTIFY, +#else + .driver = { + .name = "tda9840", + }, +#endif + .id = I2C_DRIVERID_TDA9840, .attach_adapter = attach, .detach_client = detach, .command = command, diff --git a/linux/drivers/media/video/tea6415c.c b/linux/drivers/media/video/tea6415c.c index ad09e4c1c..12e83ad21 100644 --- a/linux/drivers/media/video/tea6415c.c +++ b/linux/drivers/media/video/tea6415c.c @@ -26,6 +26,8 @@ Foundation, Inc., 675 Mvss Ave, Cambridge, MA 02139, USA. */ +#include "compat.h" + #include <linux/module.h> #include <linux/ioctl.h> #include <linux/i2c.h> @@ -190,10 +192,18 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg) } static struct i2c_driver driver = { +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) &&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) .owner = THIS_MODULE, +#endif +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .name = "tea6415c", - .id = I2C_DRIVERID_TEA6415C, .flags = I2C_DF_NOTIFY, +#else + .driver = { + .name = "tea6415c", + }, +#endif + .id = I2C_DRIVERID_TEA6415C, .attach_adapter = attach, .detach_client = detach, .command = command, diff --git a/linux/drivers/media/video/tea6420.c b/linux/drivers/media/video/tea6420.c index dd8279ad5..d22eac01b 100644 --- a/linux/drivers/media/video/tea6420.c +++ b/linux/drivers/media/video/tea6420.c @@ -26,6 +26,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "compat.h" + #include <linux/module.h> #include <linux/ioctl.h> #include <linux/i2c.h> @@ -167,10 +169,18 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg) } static struct i2c_driver driver = { +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) &&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) .owner = THIS_MODULE, +#endif +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .name = "tea6420", - .id = I2C_DRIVERID_TEA6420, .flags = I2C_DF_NOTIFY, +#else + .driver = { + .name = "tea6420", + }, +#endif + .id = I2C_DRIVERID_TEA6420, .attach_adapter = attach, .detach_client = detach, .command = command, |