diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-30 01:04:44 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-30 01:04:44 +0200 |
commit | 1784ea5527ed756f946958f45f74d1f15797c366 (patch) | |
tree | 8126fc8bf73357835aca910bb3d95be555e7af7e /linux/drivers | |
parent | 221b2e5d87ca670a9b764323c59445f1b6e3df27 (diff) | |
download | mediapointer-dvb-s2-1784ea5527ed756f946958f45f74d1f15797c366.tar.gz mediapointer-dvb-s2-1784ea5527ed756f946958f45f74d1f15797c366.tar.bz2 |
v4l2: use old-style i2c API for kernels < 2.6.26 instead of < 2.6.22
From: Hans Verkuil <hverkuil@xs4all.nl>
Originally the intention was to switch to the new style i2c API starting with
the introduction of the API in 2.6.22. However, the i2c_new_probed_device()
function has a lethal bug that wasn't fixed until 2.6.25. Or more accurately,
it was only fixed in the stable series of 2.6.25 and 2.6.26.
Given the fact that the new i2c API also changed starting with 2.6.26 (the
addition of i2c_device_id), it is easiest to switch APIs starting with
2.6.26.
This patch updates all the legacy code accordingly.
Priority: normal
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers')
50 files changed, 99 insertions, 124 deletions
diff --git a/linux/drivers/media/common/saa7146_i2c.c b/linux/drivers/media/common/saa7146_i2c.c index fa9d4f90a..fc2c95a16 100644 --- a/linux/drivers/media/common/saa7146_i2c.c +++ b/linux/drivers/media/common/saa7146_i2c.c @@ -414,8 +414,8 @@ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c saa7146_i2c_reset(dev); if (i2c_adapter) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) - /* For kernels > 2.6.22 it can actually be NULL +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) + /* For kernels > 2.6.26 it can actually be NULL when v4l2_subdev is used. */ BUG_ON(!i2c_adapter->class); #endif diff --git a/linux/drivers/media/dvb/frontends/au8522_decoder.c b/linux/drivers/media/dvb/frontends/au8522_decoder.c index 326f94d1e..81d517765 100644 --- a/linux/drivers/media/dvb/frontends/au8522_decoder.c +++ b/linux/drivers/media/dvb/frontends/au8522_decoder.c @@ -48,7 +48,7 @@ MODULE_LICENSE("GPL"); static int au8522_analog_debug; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x8e >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/adv7170.c b/linux/drivers/media/video/adv7170.c index 04e6125f2..0ce6007bb 100644 --- a/linux/drivers/media/video/adv7170.c +++ b/linux/drivers/media/video/adv7170.c @@ -44,7 +44,7 @@ MODULE_DESCRIPTION("Analog Devices ADV7170 video encoder driver"); MODULE_AUTHOR("Maxim Yevtyushkin"); MODULE_LICENSE("GPL"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0xd4 >> 1, 0xd6 >> 1, /* adv7170 IDs */ 0x54 >> 1, 0x56 >> 1, /* adv7171 IDs */ diff --git a/linux/drivers/media/video/adv7175.c b/linux/drivers/media/video/adv7175.c index c38f648f8..ffbfb7140 100644 --- a/linux/drivers/media/video/adv7175.c +++ b/linux/drivers/media/video/adv7175.c @@ -43,7 +43,7 @@ MODULE_LICENSE("GPL"); #define I2C_ADV7175 0xd4 #define I2C_ADV7176 0x54 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { I2C_ADV7175 >> 1, (I2C_ADV7175 >> 1) + 1, I2C_ADV7176 >> 1, (I2C_ADV7176 >> 1) + 1, diff --git a/linux/drivers/media/video/bt819.c b/linux/drivers/media/video/bt819.c index 5929e05ff..df4fe8d9a 100644 --- a/linux/drivers/media/video/bt819.c +++ b/linux/drivers/media/video/bt819.c @@ -49,7 +49,7 @@ static int debug; module_param(debug, int, 0); MODULE_PARM_DESC(debug, "Debug level (0-1)"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x8a >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/bt856.c b/linux/drivers/media/video/bt856.c index ab56d7d6e..ef9c3d1c7 100644 --- a/linux/drivers/media/video/bt856.c +++ b/linux/drivers/media/video/bt856.c @@ -48,7 +48,7 @@ static int debug; module_param(debug, int, 0); MODULE_PARM_DESC(debug, "Debug level (0-1)"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/bt866.c b/linux/drivers/media/video/bt866.c index 5ea31375e..87845f34c 100644 --- a/linux/drivers/media/video/bt866.c +++ b/linux/drivers/media/video/bt866.c @@ -48,7 +48,7 @@ static int debug; module_param(debug, int, 0); MODULE_PARM_DESC(debug, "Debug level (0-1)"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/bt8xx/bttv-i2c.c b/linux/drivers/media/video/bt8xx/bttv-i2c.c index dbb21f77b..bf94551c3 100644 --- a/linux/drivers/media/video/bt8xx/bttv-i2c.c +++ b/linux/drivers/media/video/bt8xx/bttv-i2c.c @@ -377,7 +377,7 @@ int __devinit init_bttv_i2c(struct bttv *btv) btv->c.i2c_adap.algo_data = &btv->i2c_algo; } btv->c.i2c_adap.owner = THIS_MODULE; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) btv->c.i2c_adap.class = I2C_CLASS_TV_ANALOG; #endif @@ -389,7 +389,7 @@ int __devinit init_bttv_i2c(struct bttv *btv) i2c_set_adapdata(&btv->c.i2c_adap, &btv->c.v4l2_dev); btv->i2c_client.adapter = &btv->c.i2c_adap; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) if (bttv_tvcards[btv->c.type].no_video) btv->c.i2c_adap.class &= ~I2C_CLASS_TV_ANALOG; if (bttv_tvcards[btv->c.type].has_dvb) diff --git a/linux/drivers/media/video/cs5345.c b/linux/drivers/media/video/cs5345.c index 3e018b558..bc98ec17a 100644 --- a/linux/drivers/media/video/cs5345.c +++ b/linux/drivers/media/video/cs5345.c @@ -37,7 +37,7 @@ module_param(debug, bool, 0644); MODULE_PARM_DESC(debug, "Debugging messages, 0=Off (default), 1=On"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x98 >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/cs53l32a.c b/linux/drivers/media/video/cs53l32a.c index 4745fd21c..a2e1f677d 100644 --- a/linux/drivers/media/video/cs53l32a.c +++ b/linux/drivers/media/video/cs53l32a.c @@ -42,7 +42,7 @@ module_param(debug, bool, 0644); MODULE_PARM_DESC(debug, "Debugging messages, 0=Off (default), 1=On"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x22 >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/cx18/cx18-i2c.c b/linux/drivers/media/video/cx18/cx18-i2c.c index bf15b648d..6c3c0449c 100644 --- a/linux/drivers/media/video/cx18/cx18-i2c.c +++ b/linux/drivers/media/video/cx18/cx18-i2c.c @@ -194,7 +194,7 @@ static struct i2c_adapter cx18_i2c_adap_template = { .algo = NULL, /* set by i2c-algo-bit */ .algo_data = NULL, /* filled from template */ .owner = THIS_MODULE, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) .class = I2C_CLASS_TV_ANALOG, #endif }; diff --git a/linux/drivers/media/video/cx23885/cx23885-i2c.c b/linux/drivers/media/video/cx23885/cx23885-i2c.c index 3b0b9d3e3..a5d9f7530 100644 --- a/linux/drivers/media/video/cx23885/cx23885-i2c.c +++ b/linux/drivers/media/video/cx23885/cx23885-i2c.c @@ -289,7 +289,7 @@ static struct i2c_adapter cx23885_i2c_adap_template = { .owner = THIS_MODULE, .id = I2C_HW_B_CX23885, .algo = &cx23885_i2c_algo_template, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) .class = I2C_CLASS_TV_ANALOG, #endif }; diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c index e5bf756e5..11f5ddce4 100644 --- a/linux/drivers/media/video/cx25840/cx25840-core.c +++ b/linux/drivers/media/video/cx25840/cx25840-core.c @@ -55,7 +55,7 @@ module_param_named(debug,cx25840_debug, int, 0644); MODULE_PARM_DESC(debug, "Debugging messages [0=Off (default) 1=On]"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c index 718f1ce69..680a8c889 100644 --- a/linux/drivers/media/video/cx88/cx88-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-i2c.c @@ -142,7 +142,7 @@ int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci) memcpy(&core->i2c_algo, &cx8800_i2c_algo_template, sizeof(core->i2c_algo)); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) if (core->board.tuner_type != TUNER_ABSENT) core->i2c_adap.class |= I2C_CLASS_TV_ANALOG; if (core->board.mpeg & CX88_MPEG_DVB) diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index a3fd7f643..7e642b6f3 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -2173,7 +2173,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, switch (core->boardnr) { case CX88_BOARD_DVICO_FUSIONHDTV_5_GOLD: case CX88_BOARD_DVICO_FUSIONHDTV_7_GOLD: { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) static struct i2c_board_info rtc_info = { I2C_BOARD_INFO("isl1208", 0x6f) }; diff --git a/linux/drivers/media/video/indycam.c b/linux/drivers/media/video/indycam.c index f2da0550b..e1aa39bd5 100644 --- a/linux/drivers/media/video/indycam.c +++ b/linux/drivers/media/video/indycam.c @@ -35,7 +35,7 @@ MODULE_VERSION(INDYCAM_MODULE_VERSION); MODULE_AUTHOR("Mikael Nousiainen <tmnousia@cc.hut.fi>"); MODULE_LICENSE("GPL"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x56 >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/ivtv/ivtv-i2c.c b/linux/drivers/media/video/ivtv/ivtv-i2c.c index 682377c1a..3f4552469 100644 --- a/linux/drivers/media/video/ivtv/ivtv-i2c.c +++ b/linux/drivers/media/video/ivtv/ivtv-i2c.c @@ -517,7 +517,7 @@ static struct i2c_adapter ivtv_i2c_adap_hw_template = { .algo = &ivtv_algo, .algo_data = NULL, /* filled from template */ .owner = THIS_MODULE, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) .class = I2C_CLASS_TV_ANALOG, #endif }; @@ -571,7 +571,7 @@ static struct i2c_adapter ivtv_i2c_adap_template = { .algo = NULL, /* set by i2c-algo-bit */ .algo_data = NULL, /* filled from template */ .owner = THIS_MODULE, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) .class = I2C_CLASS_TV_ANALOG, #endif }; diff --git a/linux/drivers/media/video/ks0127.c b/linux/drivers/media/video/ks0127.c index 198971b75..c413a1d9b 100644 --- a/linux/drivers/media/video/ks0127.c +++ b/linux/drivers/media/video/ks0127.c @@ -54,7 +54,7 @@ MODULE_LICENSE("GPL"); #define I2C_KS0127_ADDON 0xD8 #define I2C_KS0127_ONBOARD 0xDA -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { I2C_KS0127_ADDON >> 1, I2C_KS0127_ONBOARD >> 1, diff --git a/linux/drivers/media/video/m52790.c b/linux/drivers/media/video/m52790.c index 203a60348..40bdf8857 100644 --- a/linux/drivers/media/video/m52790.c +++ b/linux/drivers/media/video/m52790.c @@ -37,7 +37,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) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x90 >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c index 5b63af6f8..7a2b87621 100644 --- a/linux/drivers/media/video/msp3400-driver.c +++ b/linux/drivers/media/video/msp3400-driver.c @@ -113,7 +113,7 @@ MODULE_PARM_DESC(dolby, "Activates Dolby processsing"); /* DSP unit subaddress */ #define I2C_MSP_DSP 0x12 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) /* Addresses to scan */ static unsigned short normal_i2c[] = { 0x80 >> 1, 0x88 >> 1, I2C_CLIENT_END }; diff --git a/linux/drivers/media/video/mxb.c b/linux/drivers/media/video/mxb.c index 93209d160..af08a3df3 100644 --- a/linux/drivers/media/video/mxb.c +++ b/linux/drivers/media/video/mxb.c @@ -160,7 +160,7 @@ static int mxb_probe(struct saa7146_dev *dev) return -ENOMEM; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) mxb->i2c_adapter.class = I2C_CLASS_TV_ANALOG; #endif snprintf(mxb->i2c_adapter.name, sizeof(mxb->i2c_adapter.name), "mxb%d", mxb_num); diff --git a/linux/drivers/media/video/ovcamchip/ovcamchip_core.c b/linux/drivers/media/video/ovcamchip/ovcamchip_core.c index 8de129b41..cfeb62645 100644 --- a/linux/drivers/media/video/ovcamchip/ovcamchip_core.c +++ b/linux/drivers/media/video/ovcamchip/ovcamchip_core.c @@ -47,7 +47,7 @@ MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { /* ov7xxx */ 0x42 >> 1, 0x46 >> 1, 0x4a >> 1, 0x4e >> 1, diff --git a/linux/drivers/media/video/saa5246a.c b/linux/drivers/media/video/saa5246a.c index d7faf20bc..a5e9a8c2e 100644 --- a/linux/drivers/media/video/saa5246a.c +++ b/linux/drivers/media/video/saa5246a.c @@ -387,7 +387,7 @@ MODULE_LICENSE("GPL"); #define MINUTE_MAX 0x59 #define PAGE_MAX 0x8FF -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x11, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/saa5249.c b/linux/drivers/media/video/saa5249.c index 12f48ebd3..e5643b2b6 100644 --- a/linux/drivers/media/video/saa5249.c +++ b/linux/drivers/media/video/saa5249.c @@ -61,7 +61,7 @@ MODULE_AUTHOR("Michael Geng <linux@MichaelGeng.de>"); MODULE_DESCRIPTION("Philips SAA5249 Teletext decoder driver"); MODULE_LICENSE("GPL"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x11, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/saa6588.c b/linux/drivers/media/video/saa6588.c index 60934e0a9..58aff8305 100644 --- a/linux/drivers/media/video/saa6588.c +++ b/linux/drivers/media/video/saa6588.c @@ -37,7 +37,7 @@ #include <media/v4l2-i2c-drv.h> #include "compat.h" -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) /* Addresses to scan */ static unsigned short normal_i2c[] = { 0x20 >> 1, diff --git a/linux/drivers/media/video/saa7110.c b/linux/drivers/media/video/saa7110.c index d26737735..0eeae294f 100644 --- a/linux/drivers/media/video/saa7110.c +++ b/linux/drivers/media/video/saa7110.c @@ -43,7 +43,7 @@ MODULE_DESCRIPTION("Philips SAA7110 video decoder driver"); MODULE_AUTHOR("Pauline Middelink"); MODULE_LICENSE("GPL"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x9c >> 1, 0x9e >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c index a5ae39f35..ea23b7cb1 100644 --- a/linux/drivers/media/video/saa7115.c +++ b/linux/drivers/media/video/saa7115.c @@ -63,7 +63,7 @@ module_param(debug, bool, 0644); MODULE_PARM_DESC(debug, "Debug level (0-1)"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x4a >> 1, 0x48 >> 1, /* SAA7111, SAA7111A and SAA7113 */ 0x42 >> 1, 0x40 >> 1, /* SAA7114, SAA7115 and SAA7118 */ @@ -1686,10 +1686,9 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .name = "saa7115", .probe = saa711x_probe, .remove = saa711x_remove, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) .legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL, -#endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +#else .id_table = saa7115_id, #endif }; diff --git a/linux/drivers/media/video/saa7127.c b/linux/drivers/media/video/saa7127.c index 9beef8886..56bd3dc4d 100644 --- a/linux/drivers/media/video/saa7127.c +++ b/linux/drivers/media/video/saa7127.c @@ -70,7 +70,7 @@ module_param(test_image, int, 0644); 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) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/saa7134/saa6752hs.c b/linux/drivers/media/video/saa7134/saa6752hs.c index a96e0bb1f..860f271dd 100644 --- a/linux/drivers/media/video/saa7134/saa6752hs.c +++ b/linux/drivers/media/video/saa7134/saa6752hs.c @@ -46,7 +46,7 @@ #define MPEG_TOTAL_TARGET_BITRATE_MAX 27000 #define MPEG_PID_MAX ((1 << 14) - 1) -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) /* Addresses to scan */ static unsigned short normal_i2c[] = {0x20, 0x21, I2C_CLIENT_END}; diff --git a/linux/drivers/media/video/saa7134/saa7134-i2c.c b/linux/drivers/media/video/saa7134/saa7134-i2c.c index b77ccb5a0..3eb60aabe 100644 --- a/linux/drivers/media/video/saa7134/saa7134-i2c.c +++ b/linux/drivers/media/video/saa7134/saa7134-i2c.c @@ -363,7 +363,7 @@ static struct i2c_algorithm saa7134_algo = { static struct i2c_adapter saa7134_adap_template = { .owner = THIS_MODULE, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) .class = I2C_CLASS_TV_ANALOG, #endif .name = "saa7134", diff --git a/linux/drivers/media/video/saa717x.c b/linux/drivers/media/video/saa717x.c index 1274adeeb..15a44d2ce 100644 --- a/linux/drivers/media/video/saa717x.c +++ b/linux/drivers/media/video/saa717x.c @@ -52,7 +52,7 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)"); * Generic i2c probe * concerning the addresses: i2c wants 7 bit (without the r/w bit), so '>>1' */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x42 >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/saa7185.c b/linux/drivers/media/video/saa7185.c index 290299451..bb3e49006 100644 --- a/linux/drivers/media/video/saa7185.c +++ b/linux/drivers/media/video/saa7185.c @@ -44,7 +44,7 @@ static int debug; module_param(debug, int, 0); MODULE_PARM_DESC(debug, "Debug level (0-1)"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/saa7191.c b/linux/drivers/media/video/saa7191.c index d78fa294a..f6a6b80b6 100644 --- a/linux/drivers/media/video/saa7191.c +++ b/linux/drivers/media/video/saa7191.c @@ -35,7 +35,7 @@ MODULE_VERSION(SAA7191_MODULE_VERSION); MODULE_AUTHOR("Mikael Nousiainen <tmnousia@cc.hut.fi>"); MODULE_LICENSE("GPL"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x8a >> 1, 0x8e >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/tda7432.c b/linux/drivers/media/video/tda7432.c index 07c21a6d7..749539cb8 100644 --- a/linux/drivers/media/video/tda7432.c +++ b/linux/drivers/media/video/tda7432.c @@ -70,7 +70,7 @@ MODULE_PARM_DESC(maxvol,"Set maximium volume to +20db (0), default is 0db(1)"); module_param(maxvol, int, S_IRUGO | S_IWUSR); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) /* Address to scan (I2C address of this chip) */ static unsigned short normal_i2c[] = { I2C_ADDR_TDA7432 >> 1, diff --git a/linux/drivers/media/video/tda9840.c b/linux/drivers/media/video/tda9840.c index f6d27d581..b1fde87f3 100644 --- a/linux/drivers/media/video/tda9840.c +++ b/linux/drivers/media/video/tda9840.c @@ -57,7 +57,7 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)"); #define TDA9840_SET_BOTH_R 0x16 #define TDA9840_SET_EXTERNAL 0x7a -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x42, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; @@ -198,16 +198,14 @@ static int tda9840_remove(struct i2c_client *client) return 0; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static int tda9840_legacy_probe(struct i2c_adapter *adapter) { /* Let's see whether this is a known adapter we can attach to. Prevents conflicts with tvaudio.c. */ return adapter->id == I2C_HW_SAA7146; } -#endif - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +#else static const struct i2c_device_id tda9840_id[] = { { "tda9840", 0 }, { } @@ -219,10 +217,9 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .name = "tda9840", .probe = tda9840_probe, .remove = tda9840_remove, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) .legacy_probe = tda9840_legacy_probe, -#endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +#else .id_table = tda9840_id, #endif }; diff --git a/linux/drivers/media/video/tda9875.c b/linux/drivers/media/video/tda9875.c index 0351b13db..550c8b348 100644 --- a/linux/drivers/media/video/tda9875.c +++ b/linux/drivers/media/video/tda9875.c @@ -36,7 +36,7 @@ static int debug; /* insmod parameter */ module_param(debug, int, S_IRUGO | S_IWUSR); MODULE_LICENSE("GPL"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) /* Addresses to scan */ static unsigned short normal_i2c[] = { I2C_ADDR_TDA9875 >> 1, diff --git a/linux/drivers/media/video/tea6415c.c b/linux/drivers/media/video/tea6415c.c index eaf29bd90..3a942d17d 100644 --- a/linux/drivers/media/video/tea6415c.c +++ b/linux/drivers/media/video/tea6415c.c @@ -46,7 +46,7 @@ module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "Debug level (0-1)"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x03, 0x43, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; @@ -176,16 +176,14 @@ static int tea6415c_remove(struct i2c_client *client) return 0; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static int tea6415c_legacy_probe(struct i2c_adapter *adapter) { /* Let's see whether this is a known adapter we can attach to. Prevents conflicts with tvaudio.c. */ return adapter->id == I2C_HW_SAA7146; } -#endif - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +#else static const struct i2c_device_id tea6415c_id[] = { { "tea6415c", 0 }, { } @@ -197,10 +195,9 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .name = "tea6415c", .probe = tea6415c_probe, .remove = tea6415c_remove, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) .legacy_probe = tea6415c_legacy_probe, -#endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +#else .id_table = tea6415c_id, #endif }; diff --git a/linux/drivers/media/video/tea6420.c b/linux/drivers/media/video/tea6420.c index 8bddef6d9..5b25c3596 100644 --- a/linux/drivers/media/video/tea6420.c +++ b/linux/drivers/media/video/tea6420.c @@ -46,7 +46,7 @@ module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "Debug level (0-1)"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x4c, 0x4d, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; @@ -162,16 +162,14 @@ static int tea6420_remove(struct i2c_client *client) return 0; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static int tea6420_legacy_probe(struct i2c_adapter *adapter) { /* Let's see whether this is a known adapter we can attach to. Prevents conflicts with tvaudio.c. */ return adapter->id == I2C_HW_SAA7146; } -#endif - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +#else static const struct i2c_device_id tea6420_id[] = { { "tea6420", 0 }, { } @@ -183,10 +181,9 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .name = "tea6420", .probe = tea6420_probe, .remove = tea6420_remove, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) .legacy_probe = tea6420_legacy_probe, -#endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +#else .id_table = tea6420_id, #endif }; diff --git a/linux/drivers/media/video/tlv320aic23b.c b/linux/drivers/media/video/tlv320aic23b.c index bfba9ac0d..4173d0eb9 100644 --- a/linux/drivers/media/video/tlv320aic23b.c +++ b/linux/drivers/media/video/tlv320aic23b.c @@ -38,7 +38,7 @@ MODULE_DESCRIPTION("tlv320aic23b driver"); MODULE_AUTHOR("Scott Alfter, Ulf Eklund, Hans Verkuil"); MODULE_LICENSE("GPL"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x34 >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index 6e7ea623b..9f763535e 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -102,7 +102,7 @@ static inline struct tuner *to_tuner(struct v4l2_subdev *sd) return container_of(sd, struct tuner, sd); } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) /* standard i2c insmod options */ static unsigned short normal_i2c[] = { #if defined(CONFIG_MEDIA_TUNER_TEA5761) || (defined(CONFIG_MEDIA_TUNER_TEA5761_MODULE) && defined(MODULE)) @@ -1188,7 +1188,22 @@ register_client: return 0; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +static int tuner_remove(struct i2c_client *client) +{ + struct tuner *t = to_tuner(i2c_get_clientdata(client)); + + v4l2_device_unregister_subdev(&t->sd); + tuner_detach(&t->fe); + t->fe.analog_demod_priv = NULL; + + list_del(&t->list); + kfree(t); + return 0; +} + +/* ----------------------------------------------------------------------- */ + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static int tuner_legacy_probe(struct i2c_adapter *adap) { if (0 != addr) { @@ -1222,24 +1237,7 @@ static int tuner_legacy_probe(struct i2c_adapter *adap) } return 1; } -#endif - -static int tuner_remove(struct i2c_client *client) -{ - struct tuner *t = to_tuner(i2c_get_clientdata(client)); - - v4l2_device_unregister_subdev(&t->sd); - tuner_detach(&t->fe); - t->fe.analog_demod_priv = NULL; - - list_del(&t->list); - kfree(t); - return 0; -} - -/* ----------------------------------------------------------------------- */ - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +#else /* This driver supports many devices and the idea is to let the driver detect which device is present. So rather than listing all supported devices here, we pretend to support a single, fake device type. */ @@ -1257,10 +1255,9 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .command = tuner_command, .suspend = tuner_suspend, .resume = tuner_resume, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) .legacy_probe = tuner_legacy_probe, -#endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +#else .id_table = tuner_id, #endif }; diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c index 8e396af46..17bb81e9a 100644 --- a/linux/drivers/media/video/tvaudio.c +++ b/linux/drivers/media/video/tvaudio.c @@ -139,7 +139,7 @@ static inline struct CHIPSTATE *to_state(struct v4l2_subdev *sd) return container_of(sd, struct CHIPSTATE, sd); } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) /* ---------------------------------------------------------------------- */ /* i2c addresses */ @@ -2097,7 +2097,7 @@ static int tvaudio_remove(struct i2c_client *client) return 0; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static int tvaudio_legacy_probe(struct i2c_adapter *adap) { /* don't attach on saa7146 based cards, @@ -2108,9 +2108,7 @@ static int tvaudio_legacy_probe(struct i2c_adapter *adap) return 1; return 0; } -#endif - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +#else /* This driver supports many devices and the idea is to let the driver detect which device is present. So rather than listing all supported devices here, we pretend to support a single, fake device type. */ @@ -2125,10 +2123,9 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .name = "tvaudio", .probe = tvaudio_probe, .remove = tvaudio_remove, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) .legacy_probe = tvaudio_legacy_probe, -#endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +#else .id_table = tvaudio_id, #endif }; diff --git a/linux/drivers/media/video/tvp5150.c b/linux/drivers/media/video/tvp5150.c index 80fd240d1..490e2f2d1 100644 --- a/linux/drivers/media/video/tvp5150.c +++ b/linux/drivers/media/video/tvp5150.c @@ -20,7 +20,7 @@ MODULE_DESCRIPTION("Texas Instruments TVP5150A video decoder driver"); MODULE_AUTHOR("Mauro Carvalho Chehab"); MODULE_LICENSE("GPL"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) /* standard i2c insmod options */ static unsigned short normal_i2c[] = { 0xb8 >> 1, @@ -1193,10 +1193,9 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .name = "tvp5150", .probe = tvp5150_probe, .remove = tvp5150_remove, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) .legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL, -#endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +#else .id_table = tvp5150_id, #endif }; diff --git a/linux/drivers/media/video/upd64031a.c b/linux/drivers/media/video/upd64031a.c index 0d7f37a9e..990405335 100644 --- a/linux/drivers/media/video/upd64031a.c +++ b/linux/drivers/media/video/upd64031a.c @@ -49,7 +49,7 @@ module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "Debug level (0-1)"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x24 >> 1, 0x26 >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/upd64083.c b/linux/drivers/media/video/upd64083.c index fdedc41ef..89f51835b 100644 --- a/linux/drivers/media/video/upd64083.c +++ b/linux/drivers/media/video/upd64083.c @@ -40,7 +40,7 @@ module_param(debug, bool, 0644); MODULE_PARM_DESC(debug, "Debug level (0-1)"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0xb8 >> 1, 0xba >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/v4l2-common.c b/linux/drivers/media/video/v4l2-common.c index 912859bf1..60a8f299c 100644 --- a/linux/drivers/media/video/v4l2-common.c +++ b/linux/drivers/media/video/v4l2-common.c @@ -742,7 +742,7 @@ EXPORT_SYMBOL(v4l2_chip_ident_i2c_client); /* I2C Helper functions */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) int v4l2_i2c_attach(struct i2c_adapter *adapter, int address, struct i2c_driver *driver, const char *name, int (*probe)(struct i2c_client *, const struct i2c_device_id *)) @@ -786,7 +786,7 @@ void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, } EXPORT_SYMBOL_GPL(v4l2_i2c_subdev_init); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) /* Supporting function to find a client on a specific address on the given adapter. Used for legacy i2c drivers. */ static struct i2c_client *v4l2_i2c_legacy_find_client(struct i2c_adapter *adap, u8 addr) @@ -826,7 +826,7 @@ struct v4l2_subdev *v4l2_i2c_new_subdev(struct i2c_adapter *adapter, struct v4l2_device *dev = i2c_get_adapdata(adapter); struct v4l2_subdev *sd = NULL; struct i2c_client *client; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) struct i2c_board_info info; #endif @@ -835,15 +835,11 @@ struct v4l2_subdev *v4l2_i2c_new_subdev(struct i2c_adapter *adapter, if (module_name) request_module(module_name); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) /* Setup the i2c board info with the device type and the device address. */ memset(&info, 0, sizeof(info)); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) - strlcpy(info.driver_name, client_type, sizeof(info.driver_name)); -#else strlcpy(info.type, client_type, sizeof(info.type)); -#endif info.addr = addr; /* Create the i2c client */ @@ -874,7 +870,7 @@ struct v4l2_subdev *v4l2_i2c_new_subdev(struct i2c_adapter *adapter, module_put(client->driver->driver.owner); error: -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) /* If we have a client but no subdev, then something went wrong and we must unregister the client. */ if (client && sd == NULL) @@ -894,7 +890,7 @@ struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct i2c_adapter *adapter, struct v4l2_device *dev = i2c_get_adapdata(adapter); struct v4l2_subdev *sd = NULL; struct i2c_client *client = NULL; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) struct i2c_board_info info; #endif @@ -903,15 +899,11 @@ struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct i2c_adapter *adapter, if (module_name) request_module(module_name); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) /* Setup the i2c board info with the device type and the device address. */ memset(&info, 0, sizeof(info)); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) - strlcpy(info.driver_name, client_type, sizeof(info.driver_name)); -#else strlcpy(info.type, client_type, sizeof(info.type)); -#endif /* Probe and create the i2c client */ client = i2c_new_probed_device(adapter, &info, addrs); @@ -943,7 +935,7 @@ struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct i2c_adapter *adapter, module_put(client->driver->driver.owner); error: -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) /* If we have a client but no subdev, then something went wrong and we must unregister the client. */ if (client && sd == NULL) diff --git a/linux/drivers/media/video/vp27smpx.c b/linux/drivers/media/video/vp27smpx.c index 710c3aeca..544e6ff56 100644 --- a/linux/drivers/media/video/vp27smpx.c +++ b/linux/drivers/media/video/vp27smpx.c @@ -37,7 +37,7 @@ MODULE_DESCRIPTION("vp27smpx driver"); MODULE_AUTHOR("Hans Verkuil"); MODULE_LICENSE("GPL"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0xb6 >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/vpx3220.c b/linux/drivers/media/video/vpx3220.c index 962e9d539..8193e6277 100644 --- a/linux/drivers/media/video/vpx3220.c +++ b/linux/drivers/media/video/vpx3220.c @@ -38,7 +38,7 @@ static int debug; module_param(debug, int, 0); MODULE_PARM_DESC(debug, "Debug level (0-1)"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x86 >> 1, 0x8e >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/w9968cf.c b/linux/drivers/media/video/w9968cf.c index cf8548a7f..8eed1b6fe 100644 --- a/linux/drivers/media/video/w9968cf.c +++ b/linux/drivers/media/video/w9968cf.c @@ -1510,7 +1510,7 @@ static int w9968cf_i2c_init(struct w9968cf_device* cam) static struct i2c_adapter adap = { .id = I2C_HW_SMBUS_W9968CF, .owner = THIS_MODULE, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) .class = I2C_CLASS_TV_ANALOG, #endif .algo = &algo, diff --git a/linux/drivers/media/video/wm8739.c b/linux/drivers/media/video/wm8739.c index 619782737..16e3950c8 100644 --- a/linux/drivers/media/video/wm8739.c +++ b/linux/drivers/media/video/wm8739.c @@ -43,7 +43,7 @@ module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "Debug level (0-1)"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x34 >> 1, 0x36 >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/wm8775.c b/linux/drivers/media/video/wm8775.c index bd4729d13..e22497ad4 100644 --- a/linux/drivers/media/video/wm8775.c +++ b/linux/drivers/media/video/wm8775.c @@ -41,7 +41,7 @@ MODULE_DESCRIPTION("wm8775 driver"); MODULE_AUTHOR("Ulf Eklund, Hans Verkuil"); MODULE_LICENSE("GPL"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) static unsigned short normal_i2c[] = { 0x36 >> 1, I2C_CLIENT_END }; I2C_CLIENT_INSMOD; |