diff options
Diffstat (limited to 'linux/drivers/media/video/m52790.c')
-rw-r--r-- | linux/drivers/media/video/m52790.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/linux/drivers/media/video/m52790.c b/linux/drivers/media/video/m52790.c index 6cca77680..87e948caf 100644 --- a/linux/drivers/media/video/m52790.c +++ b/linux/drivers/media/video/m52790.c @@ -31,10 +31,6 @@ #include <media/v4l2-common.h> #include <media/v4l2-chip-ident.h> #include <media/v4l2-i2c-drv.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -#include "i2c-compat.h" -#include <linux/slab.h> -#endif #include "compat.h" MODULE_DESCRIPTION("i2c device driver for m52790 A/V switch"); @@ -44,10 +40,6 @@ MODULE_LICENSE("GPL"); #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) static unsigned short normal_i2c[] = { 0x90 >> 1, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif - I2C_CLIENT_INSMOD; #endif @@ -149,8 +141,10 @@ static int m52790_probe(struct i2c_client *client, if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) return -EIO; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) snprintf(client->name, sizeof(client->name) - 1, "m52790"); +#endif v4l_info(client, "chip found @ 0x%x (%s)\n", client->addr << 1, client->adapter->name); @@ -173,14 +167,21 @@ static int m52790_remove(struct i2c_client *client) /* ----------------------------------------------------------------------- */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +static const struct i2c_device_id m52790_id[] = { + { "m52790", 0 }, + { } +}; +MODULE_DEVICE_TABLE(i2c, m52790_id); + +#endif static struct v4l2_i2c_driver_data v4l2_i2c_data = { .name = "m52790", .driverid = I2C_DRIVERID_M52790, .command = m52790_command, .probe = m52790_probe, .remove = m52790_remove, -}; - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -EXPORT_NO_SYMBOLS; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + .id_table = m52790_id, #endif +}; |