diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-05-14 09:49:00 +0200 |
---|---|---|
committer | Patrick Boettcher <pb@linuxtv.org> | 2006-05-14 09:49:00 +0200 |
commit | b4179ae5b7a6fe509d2cf6ce601880e82c288d5c (patch) | |
tree | 08eec1d39f0d0f9108f6bc555905e6ffe06766db /linux/drivers/media | |
parent | 6d1687f3c08ec5c408b776e3e291bc8a383091e4 (diff) | |
download | mediapointer-dvb-s2-b4179ae5b7a6fe509d2cf6ce601880e82c288d5c.tar.gz mediapointer-dvb-s2-b4179ae5b7a6fe509d2cf6ce601880e82c288d5c.tar.bz2 |
Fixes after dvb_tuner_ops-conversion
From: Patrick Boettcher <pb@linuxtv.org>
Some of the dvb_tuner_ops-pointer were set before having a dvb_frontend creating.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/cxusb.c | 31 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/dibusb-common.c | 7 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/umt-010.c | 2 |
3 files changed, 23 insertions, 17 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/cxusb.c b/linux/drivers/media/dvb/dvb-usb/cxusb.c index f0bdb7323..f20925579 100644 --- a/linux/drivers/media/dvb/dvb-usb/cxusb.c +++ b/linux/drivers/media/dvb/dvb-usb/cxusb.c @@ -359,6 +359,10 @@ static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_device *d) d->pll_addr = 0x61; memcpy(d->pll_init, bpll, 4); d->pll_desc = &dvb_pll_fmd1216me; + + d->fe->ops->tuner_ops.init = dvb_usb_tuner_init_i2c; + d->fe->ops->tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; + return 0; } @@ -366,6 +370,7 @@ static int cxusb_dee1601_tuner_attach(struct dvb_usb_device *d) { d->pll_addr = 0x61; d->pll_desc = &dvb_pll_thomson_dtt7579; + d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; return 0; } @@ -373,6 +378,7 @@ static int cxusb_lgz201_tuner_attach(struct dvb_usb_device *d) { d->pll_addr = 0x61; d->pll_desc = &dvb_pll_lg_z201; + d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; return 0; } @@ -380,6 +386,13 @@ static int cxusb_dtt7579_tuner_attach(struct dvb_usb_device *d) { d->pll_addr = 0x60; d->pll_desc = &dvb_pll_thomson_dtt7579; + d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; + return 0; +} + +static int cxusb_lgdt3303_tuner_attach(struct dvb_usb_device *d) +{ + d->fe->ops->tuner_ops.set_params = cxusb_lgh064f_tuner_set_params; return 0; } @@ -391,11 +404,8 @@ static int cxusb_cx22702_frontend_attach(struct dvb_usb_device *d) cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, &b, 1); - if ((d->fe = cx22702_attach(&cxusb_cx22702_config, &d->i2c_adap)) != NULL) { - d->fe->ops->tuner_ops.init = dvb_usb_tuner_init_i2c; - d->fe->ops->tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; + if ((d->fe = cx22702_attach(&cxusb_cx22702_config, &d->i2c_adap)) != NULL) return 0; - } return -EIO; } @@ -407,10 +417,8 @@ static int cxusb_lgdt3303_frontend_attach(struct dvb_usb_device *d) cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); - if ((d->fe = lgdt330x_attach(&cxusb_lgdt3303_config, &d->i2c_adap)) != NULL) { - d->fe->ops->tuner_ops.set_params = cxusb_lgh064f_tuner_set_params; + if ((d->fe = lgdt330x_attach(&cxusb_lgdt3303_config, &d->i2c_adap)) != NULL) return 0; - } return -EIO; } @@ -422,10 +430,8 @@ static int cxusb_mt352_frontend_attach(struct dvb_usb_device *d) cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); - if ((d->fe = mt352_attach(&cxusb_mt352_config, &d->i2c_adap)) != NULL) { - d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; + if ((d->fe = mt352_attach(&cxusb_mt352_config, &d->i2c_adap)) != NULL) return 0; - } return -EIO; } @@ -437,10 +443,8 @@ static int cxusb_dee1601_frontend_attach(struct dvb_usb_device *d) cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); - if ((d->fe = mt352_attach(&cxusb_dee1601_config, &d->i2c_adap)) != NULL) { - d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; + if ((d->fe = mt352_attach(&cxusb_dee1601_config, &d->i2c_adap)) != NULL) return 0; - } return -EIO; } @@ -555,6 +559,7 @@ static struct dvb_usb_properties cxusb_bluebird_lgh064f_properties = { .streaming_ctrl = cxusb_streaming_ctrl, .power_ctrl = cxusb_bluebird_power_ctrl, .frontend_attach = cxusb_lgdt3303_frontend_attach, + .tuner_attach = cxusb_lgdt3303_tuner_attach, .i2c_algo = &cxusb_i2c_algo, diff --git a/linux/drivers/media/dvb/dvb-usb/dibusb-common.c b/linux/drivers/media/dvb/dvb-usb/dibusb-common.c index b0435c8f8..f1c2b31fc 100644 --- a/linux/drivers/media/dvb/dvb-usb/dibusb-common.c +++ b/linux/drivers/media/dvb/dvb-usb/dibusb-common.c @@ -173,9 +173,6 @@ int dibusb_dib3000mc_frontend_attach(struct dvb_usb_device *d) struct dib3000_config demod_cfg; struct dibusb_state *st = d->priv; - d->fe->ops->tuner_ops.init = dvb_usb_tuner_init_i2c; - d->fe->ops->tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; - for (demod_cfg.demod_address = 0x8; demod_cfg.demod_address < 0xd; demod_cfg.demod_address++) if ((d->fe = dib3000mc_attach(&demod_cfg,&d->i2c_adap,&st->ops)) != NULL) { d->tuner_pass_ctrl = st->ops.tuner_pass_ctrl; @@ -190,6 +187,10 @@ int dibusb_dib3000mc_tuner_attach (struct dvb_usb_device *d) { d->pll_addr = 0x60; d->pll_desc = &dvb_pll_env57h1xd5; + + d->fe->ops->tuner_ops.init = dvb_usb_tuner_init_i2c; + d->fe->ops->tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; + return 0; } EXPORT_SYMBOL(dibusb_dib3000mc_tuner_attach); diff --git a/linux/drivers/media/dvb/dvb-usb/umt-010.c b/linux/drivers/media/dvb/dvb-usb/umt-010.c index 04a45f2e4..89d52df9e 100644 --- a/linux/drivers/media/dvb/dvb-usb/umt-010.c +++ b/linux/drivers/media/dvb/dvb-usb/umt-010.c @@ -57,7 +57,6 @@ static int umt_mt352_frontend_attach(struct dvb_usb_device *d) memset(&umt_config,0,sizeof(struct mt352_config)); umt_config.demod_init = umt_mt352_demod_init; umt_config.demod_address = 0xf; - d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; d->fe = mt352_attach(&umt_config, &d->i2c_adap); @@ -68,6 +67,7 @@ static int umt_tuner_attach (struct dvb_usb_device *d) { d->pll_addr = 0x61; d->pll_desc = &dvb_pll_tua6034; + d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; return 0; } |