aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/or51132.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/frontends/or51132.c')
-rw-r--r--drivers/media/dvb/frontends/or51132.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/media/dvb/frontends/or51132.c b/drivers/media/dvb/frontends/or51132.c
index 19f75e6ed829..d20ab30c1e83 100644
--- a/drivers/media/dvb/frontends/or51132.c
+++ b/drivers/media/dvb/frontends/or51132.c
@@ -54,7 +54,6 @@ static int debug;
54struct or51132_state 54struct or51132_state
55{ 55{
56 struct i2c_adapter* i2c; 56 struct i2c_adapter* i2c;
57 struct dvb_frontend_ops ops;
58 57
59 /* Configuration settings */ 58 /* Configuration settings */
60 const struct or51132_config* config; 59 const struct or51132_config* config;
@@ -383,9 +382,9 @@ static int or51132_set_parameters(struct dvb_frontend* fe,
383 or51132_setmode(fe); 382 or51132_setmode(fe);
384 } 383 }
385 384
386 if (fe->ops->tuner_ops.set_params) { 385 if (fe->ops.tuner_ops.set_params) {
387 fe->ops->tuner_ops.set_params(fe, param); 386 fe->ops.tuner_ops.set_params(fe, param);
388 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 387 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
389 } 388 }
390 389
391 /* Set to current mode */ 390 /* Set to current mode */
@@ -618,12 +617,11 @@ struct dvb_frontend* or51132_attach(const struct or51132_config* config,
618 /* Setup the state */ 617 /* Setup the state */
619 state->config = config; 618 state->config = config;
620 state->i2c = i2c; 619 state->i2c = i2c;
621 memcpy(&state->ops, &or51132_ops, sizeof(struct dvb_frontend_ops));
622 state->current_frequency = -1; 620 state->current_frequency = -1;
623 state->current_modulation = -1; 621 state->current_modulation = -1;
624 622
625 /* Create dvb_frontend */ 623 /* Create dvb_frontend */
626 state->frontend.ops = &state->ops; 624 memcpy(&state->frontend.ops, &or51132_ops, sizeof(struct dvb_frontend_ops));
627 state->frontend.demodulator_priv = state; 625 state->frontend.demodulator_priv = state;
628 return &state->frontend; 626 return &state->frontend;
629 627
@@ -636,7 +634,7 @@ static struct dvb_frontend_ops or51132_ops = {
636 634
637 .info = { 635 .info = {
638 .name = "Oren OR51132 VSB/QAM Frontend", 636 .name = "Oren OR51132 VSB/QAM Frontend",
639 .type = FE_ATSC, 637 .type = FE_ATSC,
640 .frequency_min = 44000000, 638 .frequency_min = 44000000,
641 .frequency_max = 958000000, 639 .frequency_max = 958000000,
642 .frequency_stepsize = 166666, 640 .frequency_stepsize = 166666,