aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/tda10021.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/frontends/tda10021.c')
-rw-r--r--drivers/media/dvb/frontends/tda10021.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/media/dvb/frontends/tda10021.c b/drivers/media/dvb/frontends/tda10021.c
index c42997917191..e83ff2104c9b 100644
--- a/drivers/media/dvb/frontends/tda10021.c
+++ b/drivers/media/dvb/frontends/tda10021.c
@@ -36,7 +36,6 @@
36 36
37struct tda10021_state { 37struct tda10021_state {
38 struct i2c_adapter* i2c; 38 struct i2c_adapter* i2c;
39 struct dvb_frontend_ops ops;
40 /* configuration settings */ 39 /* configuration settings */
41 const struct tda10021_config* config; 40 const struct tda10021_config* config;
42 struct dvb_frontend frontend; 41 struct dvb_frontend frontend;
@@ -260,9 +259,9 @@ static int tda10021_set_parameters (struct dvb_frontend *fe,
260 259
261 //printk("tda10021: set frequency to %d qam=%d symrate=%d\n", p->frequency,qam,p->u.qam.symbol_rate); 260 //printk("tda10021: set frequency to %d qam=%d symrate=%d\n", p->frequency,qam,p->u.qam.symbol_rate);
262 261
263 if (fe->ops->tuner_ops.set_params) { 262 if (fe->ops.tuner_ops.set_params) {
264 fe->ops->tuner_ops.set_params(fe, p); 263 fe->ops.tuner_ops.set_params(fe, p);
265 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 264 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
266 } 265 }
267 266
268 tda10021_set_symbolrate (state, p->u.qam.symbol_rate); 267 tda10021_set_symbolrate (state, p->u.qam.symbol_rate);
@@ -421,7 +420,6 @@ struct dvb_frontend* tda10021_attach(const struct tda10021_config* config,
421 /* setup the state */ 420 /* setup the state */
422 state->config = config; 421 state->config = config;
423 state->i2c = i2c; 422 state->i2c = i2c;
424 memcpy(&state->ops, &tda10021_ops, sizeof(struct dvb_frontend_ops));
425 state->pwm = pwm; 423 state->pwm = pwm;
426 state->reg0 = tda10021_inittab[0]; 424 state->reg0 = tda10021_inittab[0];
427 425
@@ -429,7 +427,7 @@ struct dvb_frontend* tda10021_attach(const struct tda10021_config* config,
429 if ((tda10021_readreg(state, 0x1a) & 0xf0) != 0x70) goto error; 427 if ((tda10021_readreg(state, 0x1a) & 0xf0) != 0x70) goto error;
430 428
431 /* create dvb_frontend */ 429 /* create dvb_frontend */
432 state->frontend.ops = &state->ops; 430 memcpy(&state->frontend.ops, &tda10021_ops, sizeof(struct dvb_frontend_ops));
433 state->frontend.demodulator_priv = state; 431 state->frontend.demodulator_priv = state;
434 return &state->frontend; 432 return &state->frontend;
435 433