aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/tda8083.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/frontends/tda8083.c')
-rw-r--r--drivers/media/dvb/frontends/tda8083.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/media/dvb/frontends/tda8083.c b/drivers/media/dvb/frontends/tda8083.c
index 0aeaec890296..3aa45ebbac3d 100644
--- a/drivers/media/dvb/frontends/tda8083.c
+++ b/drivers/media/dvb/frontends/tda8083.c
@@ -37,7 +37,6 @@
37 37
38struct tda8083_state { 38struct tda8083_state {
39 struct i2c_adapter* i2c; 39 struct i2c_adapter* i2c;
40 struct dvb_frontend_ops ops;
41 /* configuration settings */ 40 /* configuration settings */
42 const struct tda8083_config* config; 41 const struct tda8083_config* config;
43 struct dvb_frontend frontend; 42 struct dvb_frontend frontend;
@@ -293,9 +292,9 @@ static int tda8083_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
293{ 292{
294 struct tda8083_state* state = fe->demodulator_priv; 293 struct tda8083_state* state = fe->demodulator_priv;
295 294
296 if (fe->ops->tuner_ops.set_params) { 295 if (fe->ops.tuner_ops.set_params) {
297 fe->ops->tuner_ops.set_params(fe, p); 296 fe->ops.tuner_ops.set_params(fe, p);
298 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 297 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
299 } 298 }
300 299
301 tda8083_set_inversion (state, p->inversion); 300 tda8083_set_inversion (state, p->inversion);
@@ -397,13 +396,12 @@ struct dvb_frontend* tda8083_attach(const struct tda8083_config* config,
397 /* setup the state */ 396 /* setup the state */
398 state->config = config; 397 state->config = config;
399 state->i2c = i2c; 398 state->i2c = i2c;
400 memcpy(&state->ops, &tda8083_ops, sizeof(struct dvb_frontend_ops));
401 399
402 /* check if the demod is there */ 400 /* check if the demod is there */
403 if ((tda8083_readreg(state, 0x00)) != 0x05) goto error; 401 if ((tda8083_readreg(state, 0x00)) != 0x05) goto error;
404 402
405 /* create dvb_frontend */ 403 /* create dvb_frontend */
406 state->frontend.ops = &state->ops; 404 memcpy(&state->frontend.ops, &tda8083_ops, sizeof(struct dvb_frontend_ops));
407 state->frontend.demodulator_priv = state; 405 state->frontend.demodulator_priv = state;
408 return &state->frontend; 406 return &state->frontend;
409 407