diff options
Diffstat (limited to 'drivers/media/dvb/frontends/lgdt330x.c')
-rw-r--r-- | drivers/media/dvb/frontends/lgdt330x.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/media/dvb/frontends/lgdt330x.c b/drivers/media/dvb/frontends/lgdt330x.c index 5deb6445aca5..53bafc7c9f9b 100644 --- a/drivers/media/dvb/frontends/lgdt330x.c +++ b/drivers/media/dvb/frontends/lgdt330x.c | |||
@@ -60,7 +60,6 @@ if (debug) printk(KERN_DEBUG "lgdt330x: " args); \ | |||
60 | struct lgdt330x_state | 60 | struct lgdt330x_state |
61 | { | 61 | { |
62 | struct i2c_adapter* i2c; | 62 | struct i2c_adapter* i2c; |
63 | struct dvb_frontend_ops ops; | ||
64 | 63 | ||
65 | /* Configuration settings */ | 64 | /* Configuration settings */ |
66 | const struct lgdt330x_config* config; | 65 | const struct lgdt330x_config* config; |
@@ -400,9 +399,9 @@ static int lgdt330x_set_parameters(struct dvb_frontend* fe, | |||
400 | } | 399 | } |
401 | 400 | ||
402 | /* Tune to the specified frequency */ | 401 | /* Tune to the specified frequency */ |
403 | if (fe->ops->tuner_ops.set_params) { | 402 | if (fe->ops.tuner_ops.set_params) { |
404 | fe->ops->tuner_ops.set_params(fe, param); | 403 | fe->ops.tuner_ops.set_params(fe, param); |
405 | if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); | 404 | if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); |
406 | } | 405 | } |
407 | 406 | ||
408 | /* Keep track of the new frequency */ | 407 | /* Keep track of the new frequency */ |
@@ -724,16 +723,19 @@ struct dvb_frontend* lgdt330x_attach(const struct lgdt330x_config* config, | |||
724 | /* Setup the state */ | 723 | /* Setup the state */ |
725 | state->config = config; | 724 | state->config = config; |
726 | state->i2c = i2c; | 725 | state->i2c = i2c; |
726 | |||
727 | /* Create dvb_frontend */ | ||
727 | switch (config->demod_chip) { | 728 | switch (config->demod_chip) { |
728 | case LGDT3302: | 729 | case LGDT3302: |
729 | memcpy(&state->ops, &lgdt3302_ops, sizeof(struct dvb_frontend_ops)); | 730 | memcpy(&state->frontend.ops, &lgdt3302_ops, sizeof(struct dvb_frontend_ops)); |
730 | break; | 731 | break; |
731 | case LGDT3303: | 732 | case LGDT3303: |
732 | memcpy(&state->ops, &lgdt3303_ops, sizeof(struct dvb_frontend_ops)); | 733 | memcpy(&state->frontend.ops, &lgdt3303_ops, sizeof(struct dvb_frontend_ops)); |
733 | break; | 734 | break; |
734 | default: | 735 | default: |
735 | goto error; | 736 | goto error; |
736 | } | 737 | } |
738 | state->frontend.demodulator_priv = state; | ||
737 | 739 | ||
738 | /* Verify communication with demod chip */ | 740 | /* Verify communication with demod chip */ |
739 | if (i2c_read_demod_bytes(state, 2, buf, 1)) | 741 | if (i2c_read_demod_bytes(state, 2, buf, 1)) |
@@ -742,9 +744,6 @@ struct dvb_frontend* lgdt330x_attach(const struct lgdt330x_config* config, | |||
742 | state->current_frequency = -1; | 744 | state->current_frequency = -1; |
743 | state->current_modulation = -1; | 745 | state->current_modulation = -1; |
744 | 746 | ||
745 | /* Create dvb_frontend */ | ||
746 | state->frontend.ops = &state->ops; | ||
747 | state->frontend.demodulator_priv = state; | ||
748 | return &state->frontend; | 747 | return &state->frontend; |
749 | 748 | ||
750 | error: | 749 | error: |