X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmedia%2Fdvb%2Ffrontends%2Fl64781.c;h=1aeacb1c4af7b034ba17c2bd46f43af9fac47bc6;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=1c7c91224472ce6f2078aadec88222eacf46dbd2;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/drivers/media/dvb/frontends/l64781.c b/drivers/media/dvb/frontends/l64781.c index 1c7c91224..1aeacb1c4 100644 --- a/drivers/media/dvb/frontends/l64781.c +++ b/drivers/media/dvb/frontends/l64781.c @@ -32,12 +32,11 @@ struct l64781_state { struct i2c_adapter* i2c; - struct dvb_frontend_ops ops; const struct l64781_config* config; struct dvb_frontend frontend; /* private demodulator data */ - int first:1; + unsigned int first:1; }; #define dprintk(args...) \ @@ -141,7 +140,10 @@ static int apply_frontend_param (struct dvb_frontend* fe, struct dvb_frontend_pa u8 val0x06; int bw = p->bandwidth - BANDWIDTH_8_MHZ; - state->config->pll_set(fe, param); + if (fe->ops.tuner_ops.set_params) { + fe->ops.tuner_ops.set_params(fe, param); + if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); + } if (param->inversion != INVERSION_ON && param->inversion != INVERSION_OFF) @@ -463,8 +465,6 @@ static int l64781_init(struct dvb_frontend* fe) /* Everything is two's complement, soft bit and CSI_OUT too */ l64781_writereg (state, 0x1e, 0x09); - if (state->config->pll_init) state->config->pll_init(fe); - /* delay a bit after first init attempt */ if (state->first) { state->first = 0; @@ -508,7 +508,6 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config, /* setup the state */ state->config = config; state->i2c = i2c; - memcpy(&state->ops, &l64781_ops, sizeof(struct dvb_frontend_ops)); state->first = 1; /** @@ -554,7 +553,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config, } /* create dvb_frontend */ - state->frontend.ops = &state->ops; + memcpy(&state->frontend.ops, &l64781_ops, sizeof(struct dvb_frontend_ops)); state->frontend.demodulator_priv = state; return &state->frontend;