summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cs53l32a.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/cs53l32a.c')
-rw-r--r--linux/drivers/media/video/cs53l32a.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/linux/drivers/media/video/cs53l32a.c b/linux/drivers/media/video/cs53l32a.c
index 7af5edc33..6da92d024 100644
--- a/linux/drivers/media/video/cs53l32a.c
+++ b/linux/drivers/media/video/cs53l32a.c
@@ -166,7 +166,9 @@ static int cs53l32a_attach(struct i2c_adapter *adapter, int address,
client->addr = address;
client->adapter = adapter;
client->driver = &i2c_driver;
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
client->flags = I2C_CLIENT_ALLOW_USE;
+#endif
snprintf(client->name, sizeof(client->name) - 1, "cs53l32a");
v4l_info(client, "chip found @ 0x%x (%s)\n", address << 1, adapter->name);
@@ -234,15 +236,21 @@ static int cs53l32a_detach(struct i2c_client *client)
/* i2c implementation */
static struct i2c_driver i2c_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 = "cs53l32a",
- .id = I2C_DRIVERID_CS53L32A,
.flags = I2C_DF_NOTIFY,
+#else
+ .driver = {
+ .name = "cs53l32a",
+ },
+#endif
+ .id = I2C_DRIVERID_CS53L32A,
.attach_adapter = cs53l32a_probe,
.detach_client = cs53l32a_detach,
.command = cs53l32a_command,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
- .owner = THIS_MODULE,
-#endif
};
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)