diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2006-01-07 20:43:22 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2006-01-07 20:43:22 +0000 |
commit | 891b1a330d34434953b744f5b470acf01cbcd1df (patch) | |
tree | a4deac413d4896ae8c4372d2c068d3f6a50a807e /linux/drivers/media/video/cx25840 | |
parent | a107ffe65b37a2bb7dfad1822910d281b18a2da9 (diff) | |
download | mediapointer-dvb-s2-891b1a330d34434953b744f5b470acf01cbcd1df.tar.gz mediapointer-dvb-s2-891b1a330d34434953b744f5b470acf01cbcd1df.tar.bz2 |
Some cleanups at I2C modules
- Latest patch reverted, since __stringfy seems to be needed for
kernel < 2.6.15
- Applied kernel I2C cleanups from Jean Delaware.
- driver names simplified to allow usage of newer printk macros
at v4l2-common.h
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux/drivers/media/video/cx25840')
-rw-r--r-- | linux/drivers/media/video/cx25840/cx25840-core.c | 18 | ||||
-rw-r--r-- | linux/drivers/media/video/cx25840/cx25840.h | 1 |
2 files changed, 13 insertions, 6 deletions
diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c index feb06c993..d6b13d883 100644 --- a/linux/drivers/media/video/cx25840/cx25840-core.c +++ b/linux/drivers/media/video/cx25840/cx25840-core.c @@ -888,7 +888,9 @@ static int cx25840_detect_client(struct i2c_adapter *adapter, int address, client->addr = address; client->adapter = adapter; client->driver = &i2c_driver_cx25840; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) client->flags = I2C_CLIENT_ALLOW_USE; +#endif snprintf(client->name, sizeof(client->name) - 1, "cx25840"); v4l_dbg(1, client, "detecting cx25840 client on address 0x%x\n", address << 1); @@ -965,17 +967,21 @@ static int cx25840_detach_client(struct i2c_client *client) /* ----------------------------------------------------------------------- */ static struct i2c_driver i2c_driver_cx25840 = { +#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 = "cx25840", - - .id = I2C_DRIVERID_CX25840, .flags = I2C_DF_NOTIFY, - +#else + .driver = { + .name = "cx25840", + }, +#endif + .id = I2C_DRIVERID_CX25840, .attach_adapter = cx25840_attach_adapter, .detach_client = cx25840_detach_client, .command = cx25840_command, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) - .owner = THIS_MODULE, -#endif }; #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) diff --git a/linux/drivers/media/video/cx25840/cx25840.h b/linux/drivers/media/video/cx25840/cx25840.h index 9192eb7a6..1cc52be79 100644 --- a/linux/drivers/media/video/cx25840/cx25840.h +++ b/linux/drivers/media/video/cx25840/cx25840.h @@ -22,6 +22,7 @@ #include "compat.h" + #include <linux/videodev2.h> #include <linux/i2c.h> |