summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/m52790.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/m52790.c')
-rw-r--r--linux/drivers/media/video/m52790.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/linux/drivers/media/video/m52790.c b/linux/drivers/media/video/m52790.c
index 6cca77680..77536ccfc 100644
--- a/linux/drivers/media/video/m52790.c
+++ b/linux/drivers/media/video/m52790.c
@@ -149,8 +149,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,12 +175,23 @@ 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, 6, 26)
+ .id_table = m52790_id,
+#endif
};
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0)