diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-26 11:55:09 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-29 18:41:32 -0300 |
commit | 4bf1226a7018bf79d05e0ce59244d702819529d1 (patch) | |
tree | a113ca63819851527db9ae341c6c47b2b64fcad1 /drivers/media/video/cx88/cx88-i2c.c | |
parent | 7663c1e2792a9662b23dec6e19bfcd3d55360b8f (diff) |
V4L/DVB (7749): cx88: fix tuner setup
Tuner setup were happening during i2c attach callback. This means that it would
happen on two conditions:
1) if tuner module weren't load, it will happen at request_module("tuner");
2) if tuner is not compiled as a module, or it is already loaded
(for example, on setups with more than one tuner), it will happen
when cx88 registers I2C bus.
Due to that, if tuner were loaded, tuner setup will happen _before_ reading
the proper values at tuner eeprom. Since set_addr refuses to change for a tuner
that were previously defined (except if the tuner_addr is set), this were making
eeprom tuner detection useless.
This patch removes tuner type setup from cx88-i2c, moving it to the proper
place, after taking eeprom into account.
Reviewed-by: Gert Vervoort <gert.vervoort@hccnet.nl>
Reviewed-by: Ian Pickworth <ian@pickworth.me.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-i2c.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-i2c.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/video/cx88/cx88-i2c.c index c6b44732a08..00aa7a3f110 100644 --- a/drivers/media/video/cx88/cx88-i2c.c +++ b/drivers/media/video/cx88/cx88-i2c.c @@ -104,37 +104,7 @@ static int attach_inform(struct i2c_client *client) dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n", client->driver->driver.name, client->addr, client->name); - if (!client->driver->command) - return 0; - - if (core->board.radio_type != UNSET) { - if ((core->board.radio_addr==ADDR_UNSET)||(core->board.radio_addr==client->addr)) { - tun_setup.mode_mask = T_RADIO; - tun_setup.type = core->board.radio_type; - tun_setup.addr = core->board.radio_addr; - tun_setup.tuner_callback = cx88_tuner_callback; - client->driver->command (client, TUNER_SET_TYPE_ADDR, &tun_setup); - } - } - if (core->board.tuner_type != UNSET) { - if ((core->board.tuner_addr==ADDR_UNSET)||(core->board.tuner_addr==client->addr)) { - - tun_setup.mode_mask = T_ANALOG_TV; - tun_setup.type = core->board.tuner_type; - tun_setup.addr = core->board.tuner_addr; - tun_setup.tuner_callback = cx88_tuner_callback; - client->driver->command (client,TUNER_SET_TYPE_ADDR, &tun_setup); - } - } - - if (core->board.tda9887_conf) { - struct v4l2_priv_tun_config tda9887_cfg; - tda9887_cfg.tuner = TUNER_TDA9887; - tda9887_cfg.priv = &core->board.tda9887_conf; - - client->driver->command(client, TUNER_SET_CONFIG, &tda9887_cfg); - } return 0; } |