diff options
Diffstat (limited to 'drivers/media/video/bttv-i2c.c')
-rw-r--r-- | drivers/media/video/bttv-i2c.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/drivers/media/video/bttv-i2c.c b/drivers/media/video/bttv-i2c.c index da448a5f9e9c..234a85563769 100644 --- a/drivers/media/video/bttv-i2c.c +++ b/drivers/media/video/bttv-i2c.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | $Id: bttv-i2c.c,v 1.21 2005/06/10 17:20:24 mchehab Exp $ | 2 | $Id: bttv-i2c.c,v 1.25 2005/07/05 17:37:35 nsh Exp $ |
3 | 3 | ||
4 | bttv-i2c.c -- all the i2c code is here | 4 | bttv-i2c.c -- all the i2c code is here |
5 | 5 | ||
@@ -295,14 +295,26 @@ static int attach_inform(struct i2c_client *client) | |||
295 | { | 295 | { |
296 | struct bttv *btv = i2c_get_adapdata(client->adapter); | 296 | struct bttv *btv = i2c_get_adapdata(client->adapter); |
297 | 297 | ||
298 | if (btv->tuner_type != UNSET) | 298 | if (bttv_debug) |
299 | bttv_call_i2c_clients(btv,TUNER_SET_TYPE,&btv->tuner_type); | 299 | printk(KERN_DEBUG "bttv%d: %s i2c attach [addr=0x%x,client=%s]\n", |
300 | btv->c.nr,client->driver->name,client->addr, | ||
301 | i2c_clientname(client)); | ||
302 | if (!client->driver->command) | ||
303 | return 0; | ||
304 | |||
305 | if (btv->tuner_type != UNSET) { | ||
306 | struct tuner_setup tun_setup; | ||
307 | |||
308 | tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV; | ||
309 | tun_setup.type = btv->tuner_type; | ||
310 | tun_setup.addr = ADDR_UNSET; | ||
311 | |||
312 | client->driver->command (client, TUNER_SET_TYPE_ADDR, &tun_setup); | ||
313 | } | ||
314 | |||
300 | if (btv->pinnacle_id != UNSET) | 315 | if (btv->pinnacle_id != UNSET) |
301 | bttv_call_i2c_clients(btv,AUDC_CONFIG_PINNACLE, | 316 | client->driver->command(client,AUDC_CONFIG_PINNACLE, |
302 | &btv->pinnacle_id); | 317 | &btv->pinnacle_id); |
303 | if (bttv_debug) | ||
304 | printk("bttv%d: i2c attach [client=%s]\n", | ||
305 | btv->c.nr, i2c_clientname(client)); | ||
306 | return 0; | 318 | return 0; |
307 | } | 319 | } |
308 | 320 | ||