summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/tvaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/tvaudio.c')
-rw-r--r--linux/drivers/media/video/tvaudio.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c
index ee868bb8a..2f7131d81 100644
--- a/linux/drivers/media/video/tvaudio.c
+++ b/linux/drivers/media/video/tvaudio.c
@@ -1785,14 +1785,20 @@ static int chip_command(struct i2c_client *client,
return 0;
}
-
static struct i2c_driver driver = {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,54)
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15))
.owner = THIS_MODULE,
#endif
+ static struct i2c_driver driver = {
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.name = "tvaudio",
- .id = I2C_DRIVERID_TVAUDIO,
.flags = I2C_DF_NOTIFY,
+#else
+ .driver = {
+ .name = "tvaudio",
+ },
+#endif
+ .id = I2C_DRIVERID_TVAUDIO,
.attach_adapter = chip_probe,
.detach_client = chip_detach,
.command = chip_command,
@@ -1801,7 +1807,9 @@ static struct i2c_driver driver = {
static struct i2c_client client_template =
{
.name = "(unset)",
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
.flags = I2C_CLIENT_ALLOW_USE,
+#endif
.driver = &driver,
};