diff options
Diffstat (limited to 'linux/drivers/media/video/bt8xx/bttv-i2c.c')
-rw-r--r-- | linux/drivers/media/video/bt8xx/bttv-i2c.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/linux/drivers/media/video/bt8xx/bttv-i2c.c b/linux/drivers/media/video/bt8xx/bttv-i2c.c index 558572589..3e7812c5a 100644 --- a/linux/drivers/media/video/bt8xx/bttv-i2c.c +++ b/linux/drivers/media/video/bt8xx/bttv-i2c.c @@ -289,12 +289,10 @@ static int attach_inform(struct i2c_client *client) btv->i2c_msp34xx_client = client; if (client->driver->id == I2C_DRIVERID_TVAUDIO) btv->i2c_tvaudio_client = client; - if (btv->tuner_type != UNSET) { + if (btv->tuner_type != TUNER_ABSENT) { struct tuner_setup tun_setup; - if ((addr==ADDR_UNSET) || - (addr==client->addr)) { - + if (addr == ADDR_UNSET || addr == client->addr) { tun_setup.mode_mask = T_ANALOG_TV | T_DIGITAL_TV | T_RADIO; tun_setup.type = btv->tuner_type; tun_setup.addr = addr; @@ -403,7 +401,11 @@ int __devinit init_bttv_i2c(struct bttv *btv) strlcpy(btv->c.i2c_adap.name, "bt878", sizeof(btv->c.i2c_adap.name)); btv->c.i2c_adap.id = I2C_HW_B_BT848; /* FIXME */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) + btv->c.i2c_adap.algo = (struct i2c_algorithm *)&bttv_algo; +#else btv->c.i2c_adap.algo = &bttv_algo; +#endif } else { /* bt848 */ /* Prevents usage of invalid delay values */ |