diff options
Diffstat (limited to 'drivers/media/video/bttv-i2c.c')
-rw-r--r-- | drivers/media/video/bttv-i2c.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/media/video/bttv-i2c.c b/drivers/media/video/bttv-i2c.c index d6418c023d39..748d630c7fe4 100644 --- a/drivers/media/video/bttv-i2c.c +++ b/drivers/media/video/bttv-i2c.c | |||
@@ -28,10 +28,11 @@ | |||
28 | #include <linux/moduleparam.h> | 28 | #include <linux/moduleparam.h> |
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
31 | #include <linux/jiffies.h> | ||
32 | #include <asm/io.h> | ||
33 | 31 | ||
34 | #include "bttvp.h" | 32 | #include "bttvp.h" |
33 | #include <media/v4l2-common.h> | ||
34 | #include <linux/jiffies.h> | ||
35 | #include <asm/io.h> | ||
35 | 36 | ||
36 | static struct i2c_algo_bit_data bttv_i2c_algo_bit_template; | 37 | static struct i2c_algo_bit_data bttv_i2c_algo_bit_template; |
37 | static struct i2c_adapter bttv_i2c_adap_sw_template; | 38 | static struct i2c_adapter bttv_i2c_adap_sw_template; |
@@ -105,10 +106,8 @@ static struct i2c_algo_bit_data bttv_i2c_algo_bit_template = { | |||
105 | 106 | ||
106 | static struct i2c_adapter bttv_i2c_adap_sw_template = { | 107 | static struct i2c_adapter bttv_i2c_adap_sw_template = { |
107 | .owner = THIS_MODULE, | 108 | .owner = THIS_MODULE, |
108 | #ifdef I2C_CLASS_TV_ANALOG | ||
109 | .class = I2C_CLASS_TV_ANALOG, | 109 | .class = I2C_CLASS_TV_ANALOG, |
110 | #endif | 110 | .name = "bttv", |
111 | .name = "bt848", | ||
112 | .id = I2C_HW_B_BT848, | 111 | .id = I2C_HW_B_BT848, |
113 | .client_register = attach_inform, | 112 | .client_register = attach_inform, |
114 | }; | 113 | }; |
@@ -275,10 +274,8 @@ static struct i2c_algorithm bttv_algo = { | |||
275 | }; | 274 | }; |
276 | 275 | ||
277 | static struct i2c_adapter bttv_i2c_adap_hw_template = { | 276 | static struct i2c_adapter bttv_i2c_adap_hw_template = { |
278 | .owner = THIS_MODULE, | 277 | .owner = THIS_MODULE, |
279 | #ifdef I2C_CLASS_TV_ANALOG | ||
280 | .class = I2C_CLASS_TV_ANALOG, | 278 | .class = I2C_CLASS_TV_ANALOG, |
281 | #endif | ||
282 | .name = "bt878", | 279 | .name = "bt878", |
283 | .id = I2C_HW_B_BT848 /* FIXME */, | 280 | .id = I2C_HW_B_BT848 /* FIXME */, |
284 | .algo = &bttv_algo, | 281 | .algo = &bttv_algo, |
@@ -441,12 +438,10 @@ int __devinit init_bttv_i2c(struct bttv *btv) | |||
441 | i2c_set_adapdata(&btv->c.i2c_adap, btv); | 438 | i2c_set_adapdata(&btv->c.i2c_adap, btv); |
442 | btv->i2c_client.adapter = &btv->c.i2c_adap; | 439 | btv->i2c_client.adapter = &btv->c.i2c_adap; |
443 | 440 | ||
444 | #ifdef I2C_CLASS_TV_ANALOG | ||
445 | if (bttv_tvcards[btv->c.type].no_video) | 441 | if (bttv_tvcards[btv->c.type].no_video) |
446 | btv->c.i2c_adap.class &= ~I2C_CLASS_TV_ANALOG; | 442 | btv->c.i2c_adap.class &= ~I2C_CLASS_TV_ANALOG; |
447 | if (bttv_tvcards[btv->c.type].has_dvb) | 443 | if (bttv_tvcards[btv->c.type].has_dvb) |
448 | btv->c.i2c_adap.class |= I2C_CLASS_TV_DIGITAL; | 444 | btv->c.i2c_adap.class |= I2C_CLASS_TV_DIGITAL; |
449 | #endif | ||
450 | 445 | ||
451 | if (btv->use_i2c_hw) { | 446 | if (btv->use_i2c_hw) { |
452 | btv->i2c_rc = i2c_add_adapter(&btv->c.i2c_adap); | 447 | btv->i2c_rc = i2c_add_adapter(&btv->c.i2c_adap); |