diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-09-19 19:51:33 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-10-03 22:12:27 +0400 |
commit | 136cafbf4a024b52ba0a10627217f03cea9ff9f8 (patch) | |
tree | cf827cb4d792a82a9c7b30bccc0db71547607472 /drivers/media/dvb/dvb-usb/dibusb-common.c | |
parent | 6870ab576c86a496869fbd5bb339da7e442ee7f5 (diff) | |
download | linux-136cafbf4a024b52ba0a10627217f03cea9ff9f8.tar.xz |
V4L/DVB (4646): Misc. changes, DiB3000MC, MT2060
Changed the attach-function of the dib3000mc-driver to return only one
frontend. In case of multiple dib3000-chips on one board, one has to call the
i2c-enumeration manually before.
Added a field to Microtune 2060 config to output the clock to other
tuners/device on a board.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dibusb-common.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dibusb-common.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/media/dvb/dvb-usb/dibusb-common.c b/drivers/media/dvb/dvb-usb/dibusb-common.c index 5f8afec96a3b..b4d6e539ff5a 100644 --- a/drivers/media/dvb/dvb-usb/dibusb-common.c +++ b/drivers/media/dvb/dvb-usb/dibusb-common.c @@ -230,8 +230,8 @@ static struct dib3000mc_config mod3000p_dib3000p_config = { int dibusb_dib3000mc_frontend_attach(struct dvb_usb_adapter *adap) { - if (dib3000mc_attach(&adap->dev->i2c_adap, 1, DEFAULT_DIB3000P_I2C_ADDRESS, 0, &mod3000p_dib3000p_config, &adap->fe) == 0 || - dib3000mc_attach(&adap->dev->i2c_adap, 1, DEFAULT_DIB3000MC_I2C_ADDRESS, 0, &mod3000p_dib3000p_config, &adap->fe) == 0) { + if ((adap->fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, DEFAULT_DIB3000P_I2C_ADDRESS, &mod3000p_dib3000p_config)) == NULL || + (adap->fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, DEFAULT_DIB3000MC_I2C_ADDRESS, &mod3000p_dib3000p_config)) == NULL) { if (adap->priv != NULL) { struct dibusb_state *st = adap->priv; st->ops.pid_parse = dib3000mc_pid_parse; @@ -247,10 +247,9 @@ static struct mt2060_config stk3000p_mt2060_config = { 0x60 }; -int dibusb_dib3000mc_tuner_attach (struct dvb_usb_adapter *adap) +int dibusb_dib3000mc_tuner_attach(struct dvb_usb_adapter *adap) { struct dibusb_state *st = adap->priv; - int ret; u8 a,b; u16 if1 = 1220; struct i2c_adapter *tun_i2c; @@ -287,9 +286,9 @@ int dibusb_dib3000mc_tuner_attach (struct dvb_usb_adapter *adap) } tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe, 1); - if ((ret = mt2060_attach(adap->fe, tun_i2c, &stk3000p_mt2060_config, if1)) != 0) { + if (dvb_attach(mt2060_attach, adap->fe, tun_i2c, &stk3000p_mt2060_config, if1) != NULL) { /* not found - use panasonic pll parameters */ - if (dvb_pll_attach(adap->fe, 0x60, tun_i2c, &dvb_pll_env57h1xd5) == NULL) + if (dvb_attach(dvb_pll_attach, adap->fe, 0x60, tun_i2c, &dvb_pll_env57h1xd5) == NULL) return -ENOMEM; } else { st->mt2060_present = 1; |