diff options
author | Andrew de Quincey <adq_dvb@lidskialf.net> | 2006-04-18 16:47:11 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 00:58:56 -0400 |
commit | 261143ff12eadbf17d7497cd471f70cacaca9586 (patch) | |
tree | 9f077103230415f09426cc050d379f6574cab742 /drivers/media | |
parent | 20b14562852a0d0327b86283d7391f45aa9293ef (diff) |
V4L/DVB (3870): Convert dib3000* to refactored tuner code
Convert to tuner_ops calls.
Remove pll function pointers from structure.
Remove unneeded tuner calls.
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/frontends/dib3000.h | 4 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/dib3000mb.c | 8 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/dib3000mc.c | 8 |
3 files changed, 6 insertions, 14 deletions
diff --git a/drivers/media/dvb/frontends/dib3000.h b/drivers/media/dvb/frontends/dib3000.h index 2d5475b5c063..ec927628d273 100644 --- a/drivers/media/dvb/frontends/dib3000.h +++ b/drivers/media/dvb/frontends/dib3000.h | |||
@@ -30,10 +30,6 @@ struct dib3000_config | |||
30 | { | 30 | { |
31 | /* the demodulator's i2c address */ | 31 | /* the demodulator's i2c address */ |
32 | u8 demod_address; | 32 | u8 demod_address; |
33 | |||
34 | /* PLL maintenance and the i2c address of the PLL */ | ||
35 | int (*pll_init)(struct dvb_frontend *fe); | ||
36 | int (*pll_set)(struct dvb_frontend *fe, struct dvb_frontend_parameters* params); | ||
37 | }; | 33 | }; |
38 | 34 | ||
39 | struct dib_fe_xfer_ops | 35 | struct dib_fe_xfer_ops |
diff --git a/drivers/media/dvb/frontends/dib3000mb.c b/drivers/media/dvb/frontends/dib3000mb.c index ae589adb1c0a..f2f8071ad1b0 100644 --- a/drivers/media/dvb/frontends/dib3000mb.c +++ b/drivers/media/dvb/frontends/dib3000mb.c | |||
@@ -60,8 +60,9 @@ static int dib3000mb_set_frontend(struct dvb_frontend* fe, | |||
60 | fe_code_rate_t fe_cr = FEC_NONE; | 60 | fe_code_rate_t fe_cr = FEC_NONE; |
61 | int search_state, seq; | 61 | int search_state, seq; |
62 | 62 | ||
63 | if (tuner && state->config.pll_set) { | 63 | if (tuner && fe->ops->tuner_ops.set_params) { |
64 | state->config.pll_set(fe, fep); | 64 | fe->ops->tuner_ops.set_params(fe, fep); |
65 | if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); | ||
65 | 66 | ||
66 | deb_setf("bandwidth: "); | 67 | deb_setf("bandwidth: "); |
67 | switch (ofdm->bandwidth) { | 68 | switch (ofdm->bandwidth) { |
@@ -386,9 +387,6 @@ static int dib3000mb_fe_init(struct dvb_frontend* fe, int mobile_mode) | |||
386 | 387 | ||
387 | wr(DIB3000MB_REG_DATA_IN_DIVERSITY, DIB3000MB_DATA_DIVERSITY_IN_OFF); | 388 | wr(DIB3000MB_REG_DATA_IN_DIVERSITY, DIB3000MB_DATA_DIVERSITY_IN_OFF); |
388 | 389 | ||
389 | if (state->config.pll_init) | ||
390 | state->config.pll_init(fe); | ||
391 | |||
392 | return 0; | 390 | return 0; |
393 | } | 391 | } |
394 | 392 | ||
diff --git a/drivers/media/dvb/frontends/dib3000mc.c b/drivers/media/dvb/frontends/dib3000mc.c index 3b303dbb6156..68a443b3d504 100644 --- a/drivers/media/dvb/frontends/dib3000mc.c +++ b/drivers/media/dvb/frontends/dib3000mc.c | |||
@@ -462,8 +462,9 @@ static int dib3000mc_set_frontend(struct dvb_frontend* fe, | |||
462 | int search_state,auto_val; | 462 | int search_state,auto_val; |
463 | u16 val; | 463 | u16 val; |
464 | 464 | ||
465 | if (tuner && state->config.pll_set) { /* initial call from dvb */ | 465 | if (tuner && fe->ops->tuner_ops.set_params) { /* initial call from dvb */ |
466 | state->config.pll_set(fe,fep); | 466 | fe->ops->tuner_ops.set_params(fe, fep); |
467 | if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); | ||
467 | 468 | ||
468 | state->last_tuned_freq = fep->frequency; | 469 | state->last_tuned_freq = fep->frequency; |
469 | // if (!scanboost) { | 470 | // if (!scanboost) { |
@@ -642,9 +643,6 @@ static int dib3000mc_fe_init(struct dvb_frontend* fe, int mobile_mode) | |||
642 | 643 | ||
643 | set_or(DIB3000MC_REG_CLK_CFG_7,DIB3000MC_CLK_CFG_7_DIV_IN_OFF); | 644 | set_or(DIB3000MC_REG_CLK_CFG_7,DIB3000MC_CLK_CFG_7_DIV_IN_OFF); |
644 | 645 | ||
645 | if (state->config.pll_init) | ||
646 | state->config.pll_init(fe); | ||
647 | |||
648 | deb_info("init end\n"); | 646 | deb_info("init end\n"); |
649 | return 0; | 647 | return 0; |
650 | } | 648 | } |