X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmedia%2Fdvb%2Ffrontends%2Fdib3000mb.c;fp=drivers%2Fmedia%2Fdvb%2Ffrontends%2Fdib3000mb.c;h=ae589adb1c0a47b9960bb9e5a130f47dc1619fe7;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=5302e11883a24738153dfd75f1f4c6ed3c53b354;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/drivers/media/dvb/frontends/dib3000mb.c b/drivers/media/dvb/frontends/dib3000mb.c index 5302e1188..ae589adb1 100644 --- a/drivers/media/dvb/frontends/dib3000mb.c +++ b/drivers/media/dvb/frontends/dib3000mb.c @@ -21,6 +21,7 @@ * */ +#include #include #include #include @@ -59,9 +60,8 @@ static int dib3000mb_set_frontend(struct dvb_frontend* fe, fe_code_rate_t fe_cr = FEC_NONE; int search_state, seq; - if (tuner && fe->ops.tuner_ops.set_params) { - fe->ops.tuner_ops.set_params(fe, fep); - if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); + if (tuner && state->config.pll_set) { + state->config.pll_set(fe, fep); deb_setf("bandwidth: "); switch (ofdm->bandwidth) { @@ -386,6 +386,9 @@ static int dib3000mb_fe_init(struct dvb_frontend* fe, int mobile_mode) wr(DIB3000MB_REG_DATA_IN_DIVERSITY, DIB3000MB_DATA_DIVERSITY_IN_OFF); + if (state->config.pll_init) + state->config.pll_init(fe); + return 0; } @@ -704,6 +707,7 @@ struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config, /* setup the state */ state->i2c = i2c; memcpy(&state->config,config,sizeof(struct dib3000_config)); + memcpy(&state->ops, &dib3000mb_ops, sizeof(struct dvb_frontend_ops)); /* check for the correct demod */ if (rd(DIB3000_REG_MANUFACTOR_ID) != DIB3000_I2C_ID_DIBCOM) @@ -713,7 +717,7 @@ struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config, goto error; /* create dvb_frontend */ - memcpy(&state->frontend.ops, &dib3000mb_ops, sizeof(struct dvb_frontend_ops)); + state->frontend.ops = &state->ops; state->frontend.demodulator_priv = state; /* set the xfer operations */