summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/saa7134/saa7134-i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/saa7134/saa7134-i2c.c')
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-i2c.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-i2c.c b/linux/drivers/media/video/saa7134/saa7134-i2c.c
index 4e2b17a8f..3a71fa42a 100644
--- a/linux/drivers/media/video/saa7134/saa7134-i2c.c
+++ b/linux/drivers/media/video/saa7134/saa7134-i2c.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-i2c.c,v 1.17 2005/07/04 17:06:39 mchehab Exp $
+ * $Id: saa7134-i2c.c,v 1.18 2005/07/05 17:37:35 nsh Exp $
*
* device driver for philips saa7134 based TV cards
* i2c interface support
@@ -334,7 +334,7 @@ static int attach_inform(struct i2c_client *client)
struct saa7134_dev *dev = client->adapter->algo_data;
int tuner = dev->tuner_type;
int conf = dev->tda9887_conf;
- struct tuner_addr tun_addr;
+ struct tuner_setup tun_setup;
d1printk( "%s i2c attach [addr=0x%x,client=%s]\n",
client->driver->name,client->addr,i2c_clientname(client));
@@ -342,25 +342,28 @@ static int attach_inform(struct i2c_client *client)
if (!client->driver->command)
return 0;
- tun_addr.type = saa7134_boards[dev->board].radio_type;
- if ( tun_addr.type != UNSET) {
- tun_addr.addr = saa7134_boards[dev->board].radio_addr;
+ if (saa7134_boards[dev->board].radio_type != UNSET) {
+
+ tun_setup.type = saa7134_boards[dev->board].radio_type;
+ tun_setup.addr = saa7134_boards[dev->board].radio_addr;
- if ((tun_addr.addr==ADDR_UNSET)||(tun_addr.addr==client->addr)) {
- tun_addr.state = T_RADIO;
+ if ((tun_setup.addr == ADDR_UNSET) || (tun_setup.addr == client->addr)) {
+ tun_setup.mode_mask = T_RADIO;
- client->driver->command(client,TUNER_SET_TYPE_ADDR, &tun_addr);
+ client->driver->command(client, TUNER_SET_TYPE_ADDR, &tun_setup);
}
}
- tun_addr.type = tuner;
- if (tun_addr.type != UNSET) {
- tun_addr.addr = saa7134_boards[dev->board].tuner_addr;
- if ((tun_addr.addr==ADDR_UNSET)||(tun_addr.addr==client->addr)) {
+ if (tuner != UNSET) {
- tun_addr.state = T_ANALOG_TV;
+ tun_setup.type = tuner;
+ tun_setup.addr = saa7134_boards[dev->board].tuner_addr;
- client->driver->command(client,TUNER_SET_TYPE_ADDR, &tun_addr);
+ if ((tun_setup.addr == ADDR_UNSET)||(tun_setup.addr == client->addr)) {
+
+ tun_setup.mode_mask = T_ANALOG_TV;
+
+ client->driver->command(client,TUNER_SET_TYPE_ADDR, &tun_setup);
}
}