diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-06-05 10:06:53 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-06-05 10:06:53 -0300 |
commit | 9da10a20ba6b92d9756eeaaad204e108b2b214af (patch) | |
tree | cc6367dcee752a561862d059a82e5b8af3a8cf86 /linux/drivers/media/video/cx18 | |
parent | 0f339fedba49b4571e77a6e9eada52f4101750a2 (diff) | |
download | mediapointer-dvb-s2-9da10a20ba6b92d9756eeaaad204e108b2b214af.tar.gz mediapointer-dvb-s2-9da10a20ba6b92d9756eeaaad204e108b2b214af.tar.bz2 |
backport I2C changes on several files
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Some I2C API change patches were committed at kernel. Backport those changes to
V4L/DVB tree.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/cx18')
-rw-r--r-- | linux/drivers/media/video/cx18/cx18-i2c.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/linux/drivers/media/video/cx18/cx18-i2c.c b/linux/drivers/media/video/cx18/cx18-i2c.c index 940e3718d..30ec26a61 100644 --- a/linux/drivers/media/video/cx18/cx18-i2c.c +++ b/linux/drivers/media/video/cx18/cx18-i2c.c @@ -74,7 +74,7 @@ static const u8 hw_bus[] = { }; /* This array should match the CX18_HW_ defines */ -static const char * const hw_drivernames[] = { +static const char * const hw_devicenames[] = { "tuner", "tveeprom", "cs5345", @@ -96,8 +96,12 @@ int cx18_i2c_register(struct cx18 *cx, unsigned idx) id = hw_driverids[idx]; bus = hw_bus[idx]; memset(&info, 0, sizeof(info)); - strlcpy(info.driver_name, hw_drivernames[idx], +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) + strlcpy(info.driver_name, hw_devicenames[idx], sizeof(info.driver_name)); +#else + strlcpy(info.type, hw_devicenames[idx], sizeof(info.type)); +#endif info.addr = hw_addrs[idx]; for (i = 0; i < I2C_CLIENTS_MAX; i++) if (cx->i2c_clients[i] == NULL) @@ -302,7 +306,7 @@ static const char *cx18_i2c_id_name(u32 id) for (i = 0; i < ARRAY_SIZE(hw_driverids); i++) if (hw_driverids[i] == id) - return hw_drivernames[i]; + return hw_devicenames[i]; return "unknown device"; } @@ -313,7 +317,7 @@ static const char *cx18_i2c_hw_name(u32 hw) for (i = 0; i < ARRAY_SIZE(hw_driverids); i++) if (1 << i == hw) - return hw_drivernames[i]; + return hw_devicenames[i]; return "unknown device"; } |