Commit 6f8ca0b5 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] tuner-core: Remove the now uneeded checks at fe_has_signal/get_afc

Now that those functions are only used when the corresponding
function calls are defined, we don't need to check if those
function calls are present at the structure before using it.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 383730c3
...@@ -222,8 +222,7 @@ static int fe_has_signal(struct dvb_frontend *fe) ...@@ -222,8 +222,7 @@ static int fe_has_signal(struct dvb_frontend *fe)
{ {
u16 strength = 0; u16 strength = 0;
if (fe->ops.tuner_ops.get_rf_strength) fe->ops.tuner_ops.get_rf_strength(fe, &strength);
fe->ops.tuner_ops.get_rf_strength(fe, &strength);
return strength; return strength;
} }
...@@ -232,8 +231,7 @@ static int fe_get_afc(struct dvb_frontend *fe) ...@@ -232,8 +231,7 @@ static int fe_get_afc(struct dvb_frontend *fe)
{ {
s32 afc = 0; s32 afc = 0;
if (fe->ops.tuner_ops.get_afc) fe->ops.tuner_ops.get_afc(fe, &afc);
fe->ops.tuner_ops.get_afc(fe, &afc);
return afc; return afc;
} }
...@@ -256,8 +254,6 @@ static void tuner_status(struct dvb_frontend *fe); ...@@ -256,8 +254,6 @@ static void tuner_status(struct dvb_frontend *fe);
static const struct analog_demod_ops tuner_analog_ops = { static const struct analog_demod_ops tuner_analog_ops = {
.set_params = fe_set_params, .set_params = fe_set_params,
.standby = fe_standby, .standby = fe_standby,
.has_signal = fe_has_signal,
.get_afc = fe_get_afc,
.set_config = fe_set_config, .set_config = fe_set_config,
.tuner_status = tuner_status .tuner_status = tuner_status
}; };
...@@ -453,10 +449,10 @@ static void set_type(struct i2c_client *c, unsigned int type, ...@@ -453,10 +449,10 @@ static void set_type(struct i2c_client *c, unsigned int type,
memcpy(analog_ops, &tuner_analog_ops, memcpy(analog_ops, &tuner_analog_ops,
sizeof(struct analog_demod_ops)); sizeof(struct analog_demod_ops));
if (fe_tuner_ops->get_rf_strength == NULL) if (fe_tuner_ops->get_rf_strength)
analog_ops->has_signal = NULL; analog_ops->has_signal = fe_has_signal;
if (fe_tuner_ops->get_afc == NULL) if (fe_tuner_ops->get_afc)
analog_ops->get_afc = NULL; analog_ops->get_afc = fe_get_afc;
} else { } else {
t->name = analog_ops->info.name; t->name = analog_ops->info.name;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment