summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/video/m52790.c2
-rw-r--r--linux/drivers/media/video/saa7127.c2
-rw-r--r--linux/drivers/media/video/upd64031a.c2
-rw-r--r--linux/drivers/media/video/upd64083.c2
-rw-r--r--linux/drivers/media/video/vp27smpx.c2
-rw-r--r--linux/drivers/media/video/wm8739.c5
-rw-r--r--linux/include/media/v4l2-i2c-drv.h3
7 files changed, 16 insertions, 2 deletions
diff --git a/linux/drivers/media/video/m52790.c b/linux/drivers/media/video/m52790.c
index ebe089c6d..804ef3005 100644
--- a/linux/drivers/media/video/m52790.c
+++ b/linux/drivers/media/video/m52790.c
@@ -41,6 +41,7 @@ MODULE_DESCRIPTION("i2c device driver for m52790 A/V switch");
MODULE_AUTHOR("Hans Verkuil");
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)
@@ -48,6 +49,7 @@ static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
#endif
I2C_CLIENT_INSMOD;
+#endif
struct m52790_state {
u16 input;
diff --git a/linux/drivers/media/video/saa7127.c b/linux/drivers/media/video/saa7127.c
index 27d9cab97..8a7148114 100644
--- a/linux/drivers/media/video/saa7127.c
+++ b/linux/drivers/media/video/saa7127.c
@@ -78,6 +78,7 @@ MODULE_PARM(test_image, "i");
MODULE_PARM_DESC(debug, "debug level (0-2)");
MODULE_PARM_DESC(test_image, "test_image (0-1)");
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END };
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
@@ -85,6 +86,7 @@ static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
#endif
I2C_CLIENT_INSMOD;
+#endif
/*
* SAA7127 registers
diff --git a/linux/drivers/media/video/upd64031a.c b/linux/drivers/media/video/upd64031a.c
index 6cbd124c7..98bebcab3 100644
--- a/linux/drivers/media/video/upd64031a.c
+++ b/linux/drivers/media/video/upd64031a.c
@@ -54,6 +54,7 @@ MODULE_PARM(debug, "i");
MODULE_PARM_DESC(debug, "Debug level (0-1)");
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
static unsigned short normal_i2c[] = { 0x24 >> 1, 0x26 >> 1, I2C_CLIENT_END };
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
@@ -61,6 +62,7 @@ static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
#endif
I2C_CLIENT_INSMOD;
+#endif
enum {
R00 = 0, R01, R02, R03, R04,
diff --git a/linux/drivers/media/video/upd64083.c b/linux/drivers/media/video/upd64083.c
index 34e99cfbb..2d5cb6e62 100644
--- a/linux/drivers/media/video/upd64083.c
+++ b/linux/drivers/media/video/upd64083.c
@@ -44,6 +44,7 @@ MODULE_PARM(debug, "i");
MODULE_PARM_DESC(debug, "Debug level (0-1)");
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
static unsigned short normal_i2c[] = { 0xb8 >> 1, 0xba >> 1, I2C_CLIENT_END };
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
@@ -51,6 +52,7 @@ static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
#endif
I2C_CLIENT_INSMOD;
+#endif
enum {
R00 = 0, R01, R02, R03, R04,
diff --git a/linux/drivers/media/video/vp27smpx.c b/linux/drivers/media/video/vp27smpx.c
index 602d7da63..c7099c5fe 100644
--- a/linux/drivers/media/video/vp27smpx.c
+++ b/linux/drivers/media/video/vp27smpx.c
@@ -41,6 +41,7 @@ MODULE_DESCRIPTION("vp27smpx driver");
MODULE_AUTHOR("Hans Verkuil");
MODULE_LICENSE("GPL");
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
static unsigned short normal_i2c[] = { 0xb6 >> 1, I2C_CLIENT_END };
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
@@ -48,6 +49,7 @@ static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
#endif
I2C_CLIENT_INSMOD;
+#endif
/* ----------------------------------------------------------------------- */
diff --git a/linux/drivers/media/video/wm8739.c b/linux/drivers/media/video/wm8739.c
index a0a4ed3ba..36babfdb2 100644
--- a/linux/drivers/media/video/wm8739.c
+++ b/linux/drivers/media/video/wm8739.c
@@ -42,7 +42,6 @@ MODULE_AUTHOR("T. Adachi, Hans Verkuil");
MODULE_LICENSE("GPL");
static int debug;
-static unsigned short normal_i2c[] = { 0x34 >> 1, 0x36 >> 1, I2C_CLIENT_END };
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
module_param(debug, int, 0644);
@@ -52,11 +51,15 @@ MODULE_PARM(debug, "i");
MODULE_PARM_DESC(debug, "Debug level (0-1)");
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
+static unsigned short normal_i2c[] = { 0x34 >> 1, 0x36 >> 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
/* ------------------------------------------------------------------------ */
diff --git a/linux/include/media/v4l2-i2c-drv.h b/linux/include/media/v4l2-i2c-drv.h
index 726120399..09e5f8de5 100644
--- a/linux/include/media/v4l2-i2c-drv.h
+++ b/linux/include/media/v4l2-i2c-drv.h
@@ -38,7 +38,6 @@ struct v4l2_i2c_driver_data {
};
static struct v4l2_i2c_driver_data v4l2_i2c_data;
-static struct i2c_client_address_data addr_data;
static struct i2c_driver v4l2_i2c_driver;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
@@ -59,6 +58,8 @@ static int __init v4l2_i2c_drv_init(void)
#else
+static struct i2c_client_address_data addr_data;
+
/* Bus-based I2C API is not present, add legacy code */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)