aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends/tda1004x.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/frontends/tda1004x.c')
-rw-r--r--drivers/media/dvb/frontends/tda1004x.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/media/dvb/frontends/tda1004x.c b/drivers/media/dvb/frontends/tda1004x.c
index 5288b44cf62..59a2ed614fc 100644
--- a/drivers/media/dvb/frontends/tda1004x.c
+++ b/drivers/media/dvb/frontends/tda1004x.c
@@ -47,7 +47,6 @@ enum tda1004x_demod {
47 47
48struct tda1004x_state { 48struct tda1004x_state {
49 struct i2c_adapter* i2c; 49 struct i2c_adapter* i2c;
50 struct dvb_frontend_ops ops;
51 const struct tda1004x_config* config; 50 const struct tda1004x_config* config;
52 struct dvb_frontend frontend; 51 struct dvb_frontend frontend;
53 52
@@ -695,9 +694,9 @@ static int tda1004x_set_fe(struct dvb_frontend* fe,
695 } 694 }
696 695
697 // set frequency 696 // set frequency
698 if (fe->ops->tuner_ops.set_params) { 697 if (fe->ops.tuner_ops.set_params) {
699 fe->ops->tuner_ops.set_params(fe, fe_params); 698 fe->ops.tuner_ops.set_params(fe, fe_params);
700 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 699 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
701 } 700 }
702 701
703 // Hardcoded to use auto as much as possible on the TDA10045 as it 702 // Hardcoded to use auto as much as possible on the TDA10045 as it
@@ -1243,7 +1242,6 @@ struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config,
1243 /* setup the state */ 1242 /* setup the state */
1244 state->config = config; 1243 state->config = config;
1245 state->i2c = i2c; 1244 state->i2c = i2c;
1246 memcpy(&state->ops, &tda10045_ops, sizeof(struct dvb_frontend_ops));
1247 state->demod_type = TDA1004X_DEMOD_TDA10045; 1245 state->demod_type = TDA1004X_DEMOD_TDA10045;
1248 1246
1249 /* check if the demod is there */ 1247 /* check if the demod is there */
@@ -1253,7 +1251,7 @@ struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config,
1253 } 1251 }
1254 1252
1255 /* create dvb_frontend */ 1253 /* create dvb_frontend */
1256 state->frontend.ops = &state->ops; 1254 memcpy(&state->frontend.ops, &tda10045_ops, sizeof(struct dvb_frontend_ops));
1257 state->frontend.demodulator_priv = state; 1255 state->frontend.demodulator_priv = state;
1258 return &state->frontend; 1256 return &state->frontend;
1259} 1257}
@@ -1302,7 +1300,6 @@ struct dvb_frontend* tda10046_attach(const struct tda1004x_config* config,
1302 /* setup the state */ 1300 /* setup the state */
1303 state->config = config; 1301 state->config = config;
1304 state->i2c = i2c; 1302 state->i2c = i2c;
1305 memcpy(&state->ops, &tda10046_ops, sizeof(struct dvb_frontend_ops));
1306 state->demod_type = TDA1004X_DEMOD_TDA10046; 1303 state->demod_type = TDA1004X_DEMOD_TDA10046;
1307 1304
1308 /* check if the demod is there */ 1305 /* check if the demod is there */
@@ -1312,7 +1309,7 @@ struct dvb_frontend* tda10046_attach(const struct tda1004x_config* config,
1312 } 1309 }
1313 1310
1314 /* create dvb_frontend */ 1311 /* create dvb_frontend */
1315 state->frontend.ops = &state->ops; 1312 memcpy(&state->frontend.ops, &tda10046_ops, sizeof(struct dvb_frontend_ops));
1316 state->frontend.demodulator_priv = state; 1313 state->frontend.demodulator_priv = state;
1317 return &state->frontend; 1314 return &state->frontend;
1318} 1315}