X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fmedia%2Fvideo%2Fbttv-i2c.c;h=234a85563769164e69987082961728d45a20af1b;hb=fa9846a8c5965636fbade8655ae0ce1f9a655bd4;hp=da448a5f9e9c91ea9403ce2a1dff9f9ccc533369;hpb=2d03e289ea4b13d78ce55f1ea0b0d45b8f1b34c3;p=powerpc.git diff --git a/drivers/media/video/bttv-i2c.c b/drivers/media/video/bttv-i2c.c index da448a5f9e..234a855637 100644 --- a/drivers/media/video/bttv-i2c.c +++ b/drivers/media/video/bttv-i2c.c @@ -1,5 +1,5 @@ /* - $Id: bttv-i2c.c,v 1.21 2005/06/10 17:20:24 mchehab Exp $ + $Id: bttv-i2c.c,v 1.25 2005/07/05 17:37:35 nsh Exp $ bttv-i2c.c -- all the i2c code is here @@ -295,14 +295,26 @@ static int attach_inform(struct i2c_client *client) { struct bttv *btv = i2c_get_adapdata(client->adapter); - if (btv->tuner_type != UNSET) - bttv_call_i2c_clients(btv,TUNER_SET_TYPE,&btv->tuner_type); + if (bttv_debug) + printk(KERN_DEBUG "bttv%d: %s i2c attach [addr=0x%x,client=%s]\n", + btv->c.nr,client->driver->name,client->addr, + i2c_clientname(client)); + if (!client->driver->command) + return 0; + + if (btv->tuner_type != UNSET) { + struct tuner_setup tun_setup; + + tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV; + tun_setup.type = btv->tuner_type; + tun_setup.addr = ADDR_UNSET; + + client->driver->command (client, TUNER_SET_TYPE_ADDR, &tun_setup); + } + if (btv->pinnacle_id != UNSET) - bttv_call_i2c_clients(btv,AUDC_CONFIG_PINNACLE, + client->driver->command(client,AUDC_CONFIG_PINNACLE, &btv->pinnacle_id); - if (bttv_debug) - printk("bttv%d: i2c attach [client=%s]\n", - btv->c.nr, i2c_clientname(client)); return 0; }