aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/dib3000mb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/frontends/dib3000mb.c')
-rw-r--r--drivers/media/dvb/frontends/dib3000mb.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/media/dvb/frontends/dib3000mb.c b/drivers/media/dvb/frontends/dib3000mb.c
index ae589adb1c0a..7c6dc7e30900 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
@@ -707,7 +705,6 @@ struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config,
707 /* setup the state */ 705 /* setup the state */
708 state->i2c = i2c; 706 state->i2c = i2c;
709 memcpy(&state->config,config,sizeof(struct dib3000_config)); 707 memcpy(&state->config,config,sizeof(struct dib3000_config));
710 memcpy(&state->ops, &dib3000mb_ops, sizeof(struct dvb_frontend_ops));
711 708
712 /* check for the correct demod */ 709 /* check for the correct demod */
713 if (rd(DIB3000_REG_MANUFACTOR_ID) != DIB3000_I2C_ID_DIBCOM) 710 if (rd(DIB3000_REG_MANUFACTOR_ID) != DIB3000_I2C_ID_DIBCOM)
@@ -717,7 +714,7 @@ struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config,
717 goto error; 714 goto error;
718 715
719 /* create dvb_frontend */ 716 /* create dvb_frontend */
720 state->frontend.ops = &state->ops; 717 memcpy(&state->frontend.ops, &dib3000mb_ops, sizeof(struct dvb_frontend_ops));
721 state->frontend.demodulator_priv = state; 718 state->frontend.demodulator_priv = state;
722 719
723 /* set the xfer operations */ 720 /* set the xfer operations */