diff options
Diffstat (limited to 'drivers/media/dvb/frontends/cx22700.c')
-rw-r--r-- | drivers/media/dvb/frontends/cx22700.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/media/dvb/frontends/cx22700.c b/drivers/media/dvb/frontends/cx22700.c index 02fee904752e..3c7c09a362b2 100644 --- a/drivers/media/dvb/frontends/cx22700.c +++ b/drivers/media/dvb/frontends/cx22700.c | |||
@@ -34,8 +34,6 @@ struct cx22700_state { | |||
34 | 34 | ||
35 | struct i2c_adapter* i2c; | 35 | struct i2c_adapter* i2c; |
36 | 36 | ||
37 | struct dvb_frontend_ops ops; | ||
38 | |||
39 | const struct cx22700_config* config; | 37 | const struct cx22700_config* config; |
40 | 38 | ||
41 | struct dvb_frontend frontend; | 39 | struct dvb_frontend frontend; |
@@ -327,9 +325,9 @@ static int cx22700_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par | |||
327 | cx22700_writereg (state, 0x00, 0x02); /* XXX CHECKME: soft reset*/ | 325 | cx22700_writereg (state, 0x00, 0x02); /* XXX CHECKME: soft reset*/ |
328 | cx22700_writereg (state, 0x00, 0x00); | 326 | cx22700_writereg (state, 0x00, 0x00); |
329 | 327 | ||
330 | if (fe->ops->tuner_ops.set_params) { | 328 | if (fe->ops.tuner_ops.set_params) { |
331 | fe->ops->tuner_ops.set_params(fe, p); | 329 | fe->ops.tuner_ops.set_params(fe, p); |
332 | if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); | 330 | if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); |
333 | } | 331 | } |
334 | 332 | ||
335 | cx22700_set_inversion (state, p->inversion); | 333 | cx22700_set_inversion (state, p->inversion); |
@@ -388,13 +386,12 @@ struct dvb_frontend* cx22700_attach(const struct cx22700_config* config, | |||
388 | /* setup the state */ | 386 | /* setup the state */ |
389 | state->config = config; | 387 | state->config = config; |
390 | state->i2c = i2c; | 388 | state->i2c = i2c; |
391 | memcpy(&state->ops, &cx22700_ops, sizeof(struct dvb_frontend_ops)); | ||
392 | 389 | ||
393 | /* check if the demod is there */ | 390 | /* check if the demod is there */ |
394 | if (cx22700_readreg(state, 0x07) < 0) goto error; | 391 | if (cx22700_readreg(state, 0x07) < 0) goto error; |
395 | 392 | ||
396 | /* create dvb_frontend */ | 393 | /* create dvb_frontend */ |
397 | state->frontend.ops = &state->ops; | 394 | memcpy(&state->frontend.ops, &cx22700_ops, sizeof(struct dvb_frontend_ops)); |
398 | state->frontend.demodulator_priv = state; | 395 | state->frontend.demodulator_priv = state; |
399 | return &state->frontend; | 396 | return &state->frontend; |
400 | 397 | ||