summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/wm8775.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/wm8775.c')
-rw-r--r--linux/drivers/media/video/wm8775.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/linux/drivers/media/video/wm8775.c b/linux/drivers/media/video/wm8775.c
index 30e5ce058..4fa692129 100644
--- a/linux/drivers/media/video/wm8775.c
+++ b/linux/drivers/media/video/wm8775.c
@@ -187,7 +187,9 @@ static int wm8775_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, "wm8775");
v4l_info(client, "chip found @ 0x%x (%s)\n", address << 1, adapter->name);
@@ -258,17 +260,21 @@ static int wm8775_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 = "wm8775",
-
- .id = I2C_DRIVERID_WM8775,
.flags = I2C_DF_NOTIFY,
-
- .attach_adapter = wm8775_probe,
- .detach_client = wm8775_detach,
- .command = wm8775_command,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
- .owner = THIS_MODULE,
+#else
+ .driver = {
+ .name = "wm8775",
+ },
#endif
+ .id = I2C_DRIVERID_WM8775,
+ .attach_adapter = wm8775_probe,
+ .detach_client = wm8775_detach,
+ .command = wm8775_command,
};
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)