aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/l64781.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/frontends/l64781.c')
-rw-r--r--drivers/media/dvb/frontends/l64781.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/media/dvb/frontends/l64781.c b/drivers/media/dvb/frontends/l64781.c
index fa4a87e0049e..f3bc82e44a28 100644
--- a/drivers/media/dvb/frontends/l64781.c
+++ b/drivers/media/dvb/frontends/l64781.c
@@ -32,7 +32,6 @@
32 32
33struct l64781_state { 33struct l64781_state {
34 struct i2c_adapter* i2c; 34 struct i2c_adapter* i2c;
35 struct dvb_frontend_ops ops;
36 const struct l64781_config* config; 35 const struct l64781_config* config;
37 struct dvb_frontend frontend; 36 struct dvb_frontend frontend;
38 37
@@ -141,9 +140,9 @@ static int apply_frontend_param (struct dvb_frontend* fe, struct dvb_frontend_pa
141 u8 val0x06; 140 u8 val0x06;
142 int bw = p->bandwidth - BANDWIDTH_8_MHZ; 141 int bw = p->bandwidth - BANDWIDTH_8_MHZ;
143 142
144 if (fe->ops->tuner_ops.set_params) { 143 if (fe->ops.tuner_ops.set_params) {
145 fe->ops->tuner_ops.set_params(fe, param); 144 fe->ops.tuner_ops.set_params(fe, param);
146 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 145 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
147 } 146 }
148 147
149 if (param->inversion != INVERSION_ON && 148 if (param->inversion != INVERSION_ON &&
@@ -509,7 +508,6 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config,
509 /* setup the state */ 508 /* setup the state */
510 state->config = config; 509 state->config = config;
511 state->i2c = i2c; 510 state->i2c = i2c;
512 memcpy(&state->ops, &l64781_ops, sizeof(struct dvb_frontend_ops));
513 state->first = 1; 511 state->first = 1;
514 512
515 /** 513 /**
@@ -555,7 +553,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config,
555 } 553 }
556 554
557 /* create dvb_frontend */ 555 /* create dvb_frontend */
558 state->frontend.ops = &state->ops; 556 memcpy(&state->frontend.ops, &l64781_ops, sizeof(struct dvb_frontend_ops));
559 state->frontend.demodulator_priv = state; 557 state->frontend.demodulator_priv = state;
560 return &state->frontend; 558 return &state->frontend;
561 559