diff options
Diffstat (limited to 'drivers/media/dvb/frontends/sp8870.c')
-rw-r--r-- | drivers/media/dvb/frontends/sp8870.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/media/dvb/frontends/sp8870.c b/drivers/media/dvb/frontends/sp8870.c index 4d553c0dabb3..44ec5b9a4695 100644 --- a/drivers/media/dvb/frontends/sp8870.c +++ b/drivers/media/dvb/frontends/sp8870.c | |||
@@ -44,8 +44,6 @@ struct sp8870_state { | |||
44 | 44 | ||
45 | struct i2c_adapter* i2c; | 45 | struct i2c_adapter* i2c; |
46 | 46 | ||
47 | struct dvb_frontend_ops ops; | ||
48 | |||
49 | const struct sp8870_config* config; | 47 | const struct sp8870_config* config; |
50 | 48 | ||
51 | struct dvb_frontend frontend; | 49 | struct dvb_frontend frontend; |
@@ -262,9 +260,9 @@ static int sp8870_set_frontend_parameters (struct dvb_frontend* fe, | |||
262 | sp8870_microcontroller_stop(state); | 260 | sp8870_microcontroller_stop(state); |
263 | 261 | ||
264 | // set tuner parameters | 262 | // set tuner parameters |
265 | if (fe->ops->tuner_ops.set_params) { | 263 | if (fe->ops.tuner_ops.set_params) { |
266 | fe->ops->tuner_ops.set_params(fe, p); | 264 | fe->ops.tuner_ops.set_params(fe, p); |
267 | if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); | 265 | if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); |
268 | } | 266 | } |
269 | 267 | ||
270 | // sample rate correction bit [23..17] | 268 | // sample rate correction bit [23..17] |
@@ -566,14 +564,13 @@ struct dvb_frontend* sp8870_attach(const struct sp8870_config* config, | |||
566 | /* setup the state */ | 564 | /* setup the state */ |
567 | state->config = config; | 565 | state->config = config; |
568 | state->i2c = i2c; | 566 | state->i2c = i2c; |
569 | memcpy(&state->ops, &sp8870_ops, sizeof(struct dvb_frontend_ops)); | ||
570 | state->initialised = 0; | 567 | state->initialised = 0; |
571 | 568 | ||
572 | /* check if the demod is there */ | 569 | /* check if the demod is there */ |
573 | if (sp8870_readreg(state, 0x0200) < 0) goto error; | 570 | if (sp8870_readreg(state, 0x0200) < 0) goto error; |
574 | 571 | ||
575 | /* create dvb_frontend */ | 572 | /* create dvb_frontend */ |
576 | state->frontend.ops = &state->ops; | 573 | memcpy(&state->frontend.ops, &sp8870_ops, sizeof(struct dvb_frontend_ops)); |
577 | state->frontend.demodulator_priv = state; | 574 | state->frontend.demodulator_priv = state; |
578 | return &state->frontend; | 575 | return &state->frontend; |
579 | 576 | ||