From fa9846a8c5965636fbade8655ae0ce1f9a655bd4 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Tue, 12 Jul 2005 13:58:42 -0700 Subject: [PATCH] v4l: BTTV update - use DMA_32BIT_MASK. - Rename tuner structures fields. - Tail spaces removed. - I2C cleanups and converged to a basic reference structure. - Removed unused structures. - Removed BTTV version check. Signed-off-by: Signed-off-by: Michael Krufky Signed-Off-By: Nickolay V. Shmyrev Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/media/video/bttv-i2c.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'drivers/media/video/bttv-i2c.c') diff --git a/drivers/media/video/bttv-i2c.c b/drivers/media/video/bttv-i2c.c index da448a5..234a855 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; } -- cgit v1.1