Commit 50727719 authored by Andreas Oberritter's avatar Andreas Oberritter Committed by Mauro Carvalho Chehab

[media] DVB: dvb_frontend: use shortcut to access fe->dtv_property_cache

Signed-off-by: default avatarAndreas Oberritter <obi@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 68bdee04
...@@ -858,34 +858,34 @@ static int dvb_frontend_check_parameters(struct dvb_frontend *fe, ...@@ -858,34 +858,34 @@ static int dvb_frontend_check_parameters(struct dvb_frontend *fe,
static int dvb_frontend_clear_cache(struct dvb_frontend *fe) static int dvb_frontend_clear_cache(struct dvb_frontend *fe)
{ {
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
int i; int i;
memset(&(fe->dtv_property_cache), 0, memset(c, 0, sizeof(struct dtv_frontend_properties));
sizeof(struct dtv_frontend_properties));
c->state = DTV_CLEAR;
fe->dtv_property_cache.state = DTV_CLEAR; c->delivery_system = SYS_UNDEFINED;
fe->dtv_property_cache.delivery_system = SYS_UNDEFINED; c->inversion = INVERSION_AUTO;
fe->dtv_property_cache.inversion = INVERSION_AUTO; c->fec_inner = FEC_AUTO;
fe->dtv_property_cache.fec_inner = FEC_AUTO; c->transmission_mode = TRANSMISSION_MODE_AUTO;
fe->dtv_property_cache.transmission_mode = TRANSMISSION_MODE_AUTO; c->bandwidth_hz = BANDWIDTH_AUTO;
fe->dtv_property_cache.bandwidth_hz = BANDWIDTH_AUTO; c->guard_interval = GUARD_INTERVAL_AUTO;
fe->dtv_property_cache.guard_interval = GUARD_INTERVAL_AUTO; c->hierarchy = HIERARCHY_AUTO;
fe->dtv_property_cache.hierarchy = HIERARCHY_AUTO; c->symbol_rate = QAM_AUTO;
fe->dtv_property_cache.symbol_rate = QAM_AUTO; c->code_rate_HP = FEC_AUTO;
fe->dtv_property_cache.code_rate_HP = FEC_AUTO; c->code_rate_LP = FEC_AUTO;
fe->dtv_property_cache.code_rate_LP = FEC_AUTO;
c->isdbt_partial_reception = -1;
fe->dtv_property_cache.isdbt_partial_reception = -1; c->isdbt_sb_mode = -1;
fe->dtv_property_cache.isdbt_sb_mode = -1; c->isdbt_sb_subchannel = -1;
fe->dtv_property_cache.isdbt_sb_subchannel = -1; c->isdbt_sb_segment_idx = -1;
fe->dtv_property_cache.isdbt_sb_segment_idx = -1; c->isdbt_sb_segment_count = -1;
fe->dtv_property_cache.isdbt_sb_segment_count = -1; c->isdbt_layer_enabled = 0x7;
fe->dtv_property_cache.isdbt_layer_enabled = 0x7;
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
fe->dtv_property_cache.layer[i].fec = FEC_AUTO; c->layer[i].fec = FEC_AUTO;
fe->dtv_property_cache.layer[i].modulation = QAM_AUTO; c->layer[i].modulation = QAM_AUTO;
fe->dtv_property_cache.layer[i].interleaving = -1; c->layer[i].interleaving = -1;
fe->dtv_property_cache.layer[i].segment_count = -1; c->layer[i].segment_count = -1;
} }
return 0; return 0;
...@@ -1194,121 +1194,122 @@ static int dtv_property_process_get(struct dvb_frontend *fe, ...@@ -1194,121 +1194,122 @@ static int dtv_property_process_get(struct dvb_frontend *fe,
struct dtv_property *tvp, struct dtv_property *tvp,
struct file *file) struct file *file)
{ {
const struct dtv_frontend_properties *c = &fe->dtv_property_cache;
int r; int r;
switch(tvp->cmd) { switch(tvp->cmd) {
case DTV_FREQUENCY: case DTV_FREQUENCY:
tvp->u.data = fe->dtv_property_cache.frequency; tvp->u.data = c->frequency;
break; break;
case DTV_MODULATION: case DTV_MODULATION:
tvp->u.data = fe->dtv_property_cache.modulation; tvp->u.data = c->modulation;
break; break;
case DTV_BANDWIDTH_HZ: case DTV_BANDWIDTH_HZ:
tvp->u.data = fe->dtv_property_cache.bandwidth_hz; tvp->u.data = c->bandwidth_hz;
break; break;
case DTV_INVERSION: case DTV_INVERSION:
tvp->u.data = fe->dtv_property_cache.inversion; tvp->u.data = c->inversion;
break; break;
case DTV_SYMBOL_RATE: case DTV_SYMBOL_RATE:
tvp->u.data = fe->dtv_property_cache.symbol_rate; tvp->u.data = c->symbol_rate;
break; break;
case DTV_INNER_FEC: case DTV_INNER_FEC:
tvp->u.data = fe->dtv_property_cache.fec_inner; tvp->u.data = c->fec_inner;
break; break;
case DTV_PILOT: case DTV_PILOT:
tvp->u.data = fe->dtv_property_cache.pilot; tvp->u.data = c->pilot;
break; break;
case DTV_ROLLOFF: case DTV_ROLLOFF:
tvp->u.data = fe->dtv_property_cache.rolloff; tvp->u.data = c->rolloff;
break; break;
case DTV_DELIVERY_SYSTEM: case DTV_DELIVERY_SYSTEM:
tvp->u.data = fe->dtv_property_cache.delivery_system; tvp->u.data = c->delivery_system;
break; break;
case DTV_VOLTAGE: case DTV_VOLTAGE:
tvp->u.data = fe->dtv_property_cache.voltage; tvp->u.data = c->voltage;
break; break;
case DTV_TONE: case DTV_TONE:
tvp->u.data = fe->dtv_property_cache.sectone; tvp->u.data = c->sectone;
break; break;
case DTV_API_VERSION: case DTV_API_VERSION:
tvp->u.data = (DVB_API_VERSION << 8) | DVB_API_VERSION_MINOR; tvp->u.data = (DVB_API_VERSION << 8) | DVB_API_VERSION_MINOR;
break; break;
case DTV_CODE_RATE_HP: case DTV_CODE_RATE_HP:
tvp->u.data = fe->dtv_property_cache.code_rate_HP; tvp->u.data = c->code_rate_HP;
break; break;
case DTV_CODE_RATE_LP: case DTV_CODE_RATE_LP:
tvp->u.data = fe->dtv_property_cache.code_rate_LP; tvp->u.data = c->code_rate_LP;
break; break;
case DTV_GUARD_INTERVAL: case DTV_GUARD_INTERVAL:
tvp->u.data = fe->dtv_property_cache.guard_interval; tvp->u.data = c->guard_interval;
break; break;
case DTV_TRANSMISSION_MODE: case DTV_TRANSMISSION_MODE:
tvp->u.data = fe->dtv_property_cache.transmission_mode; tvp->u.data = c->transmission_mode;
break; break;
case DTV_HIERARCHY: case DTV_HIERARCHY:
tvp->u.data = fe->dtv_property_cache.hierarchy; tvp->u.data = c->hierarchy;
break; break;
/* ISDB-T Support here */ /* ISDB-T Support here */
case DTV_ISDBT_PARTIAL_RECEPTION: case DTV_ISDBT_PARTIAL_RECEPTION:
tvp->u.data = fe->dtv_property_cache.isdbt_partial_reception; tvp->u.data = c->isdbt_partial_reception;
break; break;
case DTV_ISDBT_SOUND_BROADCASTING: case DTV_ISDBT_SOUND_BROADCASTING:
tvp->u.data = fe->dtv_property_cache.isdbt_sb_mode; tvp->u.data = c->isdbt_sb_mode;
break; break;
case DTV_ISDBT_SB_SUBCHANNEL_ID: case DTV_ISDBT_SB_SUBCHANNEL_ID:
tvp->u.data = fe->dtv_property_cache.isdbt_sb_subchannel; tvp->u.data = c->isdbt_sb_subchannel;
break; break;
case DTV_ISDBT_SB_SEGMENT_IDX: case DTV_ISDBT_SB_SEGMENT_IDX:
tvp->u.data = fe->dtv_property_cache.isdbt_sb_segment_idx; tvp->u.data = c->isdbt_sb_segment_idx;
break; break;
case DTV_ISDBT_SB_SEGMENT_COUNT: case DTV_ISDBT_SB_SEGMENT_COUNT:
tvp->u.data = fe->dtv_property_cache.isdbt_sb_segment_count; tvp->u.data = c->isdbt_sb_segment_count;
break; break;
case DTV_ISDBT_LAYER_ENABLED: case DTV_ISDBT_LAYER_ENABLED:
tvp->u.data = fe->dtv_property_cache.isdbt_layer_enabled; tvp->u.data = c->isdbt_layer_enabled;
break; break;
case DTV_ISDBT_LAYERA_FEC: case DTV_ISDBT_LAYERA_FEC:
tvp->u.data = fe->dtv_property_cache.layer[0].fec; tvp->u.data = c->layer[0].fec;
break; break;
case DTV_ISDBT_LAYERA_MODULATION: case DTV_ISDBT_LAYERA_MODULATION:
tvp->u.data = fe->dtv_property_cache.layer[0].modulation; tvp->u.data = c->layer[0].modulation;
break; break;
case DTV_ISDBT_LAYERA_SEGMENT_COUNT: case DTV_ISDBT_LAYERA_SEGMENT_COUNT:
tvp->u.data = fe->dtv_property_cache.layer[0].segment_count; tvp->u.data = c->layer[0].segment_count;
break; break;
case DTV_ISDBT_LAYERA_TIME_INTERLEAVING: case DTV_ISDBT_LAYERA_TIME_INTERLEAVING:
tvp->u.data = fe->dtv_property_cache.layer[0].interleaving; tvp->u.data = c->layer[0].interleaving;
break; break;
case DTV_ISDBT_LAYERB_FEC: case DTV_ISDBT_LAYERB_FEC:
tvp->u.data = fe->dtv_property_cache.layer[1].fec; tvp->u.data = c->layer[1].fec;
break; break;
case DTV_ISDBT_LAYERB_MODULATION: case DTV_ISDBT_LAYERB_MODULATION:
tvp->u.data = fe->dtv_property_cache.layer[1].modulation; tvp->u.data = c->layer[1].modulation;
break; break;
case DTV_ISDBT_LAYERB_SEGMENT_COUNT: case DTV_ISDBT_LAYERB_SEGMENT_COUNT:
tvp->u.data = fe->dtv_property_cache.layer[1].segment_count; tvp->u.data = c->layer[1].segment_count;
break; break;
case DTV_ISDBT_LAYERB_TIME_INTERLEAVING: case DTV_ISDBT_LAYERB_TIME_INTERLEAVING:
tvp->u.data = fe->dtv_property_cache.layer[1].interleaving; tvp->u.data = c->layer[1].interleaving;
break; break;
case DTV_ISDBT_LAYERC_FEC: case DTV_ISDBT_LAYERC_FEC:
tvp->u.data = fe->dtv_property_cache.layer[2].fec; tvp->u.data = c->layer[2].fec;
break; break;
case DTV_ISDBT_LAYERC_MODULATION: case DTV_ISDBT_LAYERC_MODULATION:
tvp->u.data = fe->dtv_property_cache.layer[2].modulation; tvp->u.data = c->layer[2].modulation;
break; break;
case DTV_ISDBT_LAYERC_SEGMENT_COUNT: case DTV_ISDBT_LAYERC_SEGMENT_COUNT:
tvp->u.data = fe->dtv_property_cache.layer[2].segment_count; tvp->u.data = c->layer[2].segment_count;
break; break;
case DTV_ISDBT_LAYERC_TIME_INTERLEAVING: case DTV_ISDBT_LAYERC_TIME_INTERLEAVING:
tvp->u.data = fe->dtv_property_cache.layer[2].interleaving; tvp->u.data = c->layer[2].interleaving;
break; break;
case DTV_ISDBS_TS_ID: case DTV_ISDBS_TS_ID:
tvp->u.data = fe->dtv_property_cache.isdbs_ts_id; tvp->u.data = c->isdbs_ts_id;
break; break;
case DTV_DVBT2_PLP_ID: case DTV_DVBT2_PLP_ID:
tvp->u.data = fe->dtv_property_cache.dvbt2_plp_id; tvp->u.data = c->dvbt2_plp_id;
break; break;
default: default:
return -EINVAL; return -EINVAL;
...@@ -1331,6 +1332,7 @@ static int dtv_property_process_set(struct dvb_frontend *fe, ...@@ -1331,6 +1332,7 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
struct file *file) struct file *file)
{ {
int r = 0; int r = 0;
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct dvb_frontend_private *fepriv = fe->frontend_priv; struct dvb_frontend_private *fepriv = fe->frontend_priv;
dtv_property_dump(tvp); dtv_property_dump(tvp);
...@@ -1354,7 +1356,7 @@ static int dtv_property_process_set(struct dvb_frontend *fe, ...@@ -1354,7 +1356,7 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
* tunerequest so we can pass validation in the FE_SET_FRONTEND * tunerequest so we can pass validation in the FE_SET_FRONTEND
* ioctl. * ioctl.
*/ */
fe->dtv_property_cache.state = tvp->cmd; c->state = tvp->cmd;
dprintk("%s() Finalised property cache\n", __func__); dprintk("%s() Finalised property cache\n", __func__);
dtv_property_cache_submit(fe); dtv_property_cache_submit(fe);
...@@ -1362,118 +1364,118 @@ static int dtv_property_process_set(struct dvb_frontend *fe, ...@@ -1362,118 +1364,118 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
&fepriv->parameters_in); &fepriv->parameters_in);
break; break;
case DTV_FREQUENCY: case DTV_FREQUENCY:
fe->dtv_property_cache.frequency = tvp->u.data; c->frequency = tvp->u.data;
break; break;
case DTV_MODULATION: case DTV_MODULATION:
fe->dtv_property_cache.modulation = tvp->u.data; c->modulation = tvp->u.data;
break; break;
case DTV_BANDWIDTH_HZ: case DTV_BANDWIDTH_HZ:
fe->dtv_property_cache.bandwidth_hz = tvp->u.data; c->bandwidth_hz = tvp->u.data;
break; break;
case DTV_INVERSION: case DTV_INVERSION:
fe->dtv_property_cache.inversion = tvp->u.data; c->inversion = tvp->u.data;
break; break;
case DTV_SYMBOL_RATE: case DTV_SYMBOL_RATE:
fe->dtv_property_cache.symbol_rate = tvp->u.data; c->symbol_rate = tvp->u.data;
break; break;
case DTV_INNER_FEC: case DTV_INNER_FEC:
fe->dtv_property_cache.fec_inner = tvp->u.data; c->fec_inner = tvp->u.data;
break; break;
case DTV_PILOT: case DTV_PILOT:
fe->dtv_property_cache.pilot = tvp->u.data; c->pilot = tvp->u.data;
break; break;
case DTV_ROLLOFF: case DTV_ROLLOFF:
fe->dtv_property_cache.rolloff = tvp->u.data; c->rolloff = tvp->u.data;
break; break;
case DTV_DELIVERY_SYSTEM: case DTV_DELIVERY_SYSTEM:
fe->dtv_property_cache.delivery_system = tvp->u.data; c->delivery_system = tvp->u.data;
break; break;
case DTV_VOLTAGE: case DTV_VOLTAGE:
fe->dtv_property_cache.voltage = tvp->u.data; c->voltage = tvp->u.data;
r = dvb_frontend_ioctl_legacy(file, FE_SET_VOLTAGE, r = dvb_frontend_ioctl_legacy(file, FE_SET_VOLTAGE,
(void *)fe->dtv_property_cache.voltage); (void *)c->voltage);
break; break;
case DTV_TONE: case DTV_TONE:
fe->dtv_property_cache.sectone = tvp->u.data; c->sectone = tvp->u.data;
r = dvb_frontend_ioctl_legacy(file, FE_SET_TONE, r = dvb_frontend_ioctl_legacy(file, FE_SET_TONE,
(void *)fe->dtv_property_cache.sectone); (void *)c->sectone);
break; break;
case DTV_CODE_RATE_HP: case DTV_CODE_RATE_HP:
fe->dtv_property_cache.code_rate_HP = tvp->u.data; c->code_rate_HP = tvp->u.data;
break; break;
case DTV_CODE_RATE_LP: case DTV_CODE_RATE_LP:
fe->dtv_property_cache.code_rate_LP = tvp->u.data; c->code_rate_LP = tvp->u.data;
break; break;
case DTV_GUARD_INTERVAL: case DTV_GUARD_INTERVAL:
fe->dtv_property_cache.guard_interval = tvp->u.data; c->guard_interval = tvp->u.data;
break; break;
case DTV_TRANSMISSION_MODE: case DTV_TRANSMISSION_MODE:
fe->dtv_property_cache.transmission_mode = tvp->u.data; c->transmission_mode = tvp->u.data;
break; break;
case DTV_HIERARCHY: case DTV_HIERARCHY:
fe->dtv_property_cache.hierarchy = tvp->u.data; c->hierarchy = tvp->u.data;
break; break;
/* ISDB-T Support here */ /* ISDB-T Support here */
case DTV_ISDBT_PARTIAL_RECEPTION: case DTV_ISDBT_PARTIAL_RECEPTION:
fe->dtv_property_cache.isdbt_partial_reception = tvp->u.data; c->isdbt_partial_reception = tvp->u.data;
break; break;
case DTV_ISDBT_SOUND_BROADCASTING: case DTV_ISDBT_SOUND_BROADCASTING:
fe->dtv_property_cache.isdbt_sb_mode = tvp->u.data; c->isdbt_sb_mode = tvp->u.data;
break; break;
case DTV_ISDBT_SB_SUBCHANNEL_ID: case DTV_ISDBT_SB_SUBCHANNEL_ID:
fe->dtv_property_cache.isdbt_sb_subchannel = tvp->u.data; c->isdbt_sb_subchannel = tvp->u.data;
break; break;
case DTV_ISDBT_SB_SEGMENT_IDX: case DTV_ISDBT_SB_SEGMENT_IDX:
fe->dtv_property_cache.isdbt_sb_segment_idx = tvp->u.data; c->isdbt_sb_segment_idx = tvp->u.data;
break; break;
case DTV_ISDBT_SB_SEGMENT_COUNT: case DTV_ISDBT_SB_SEGMENT_COUNT:
fe->dtv_property_cache.isdbt_sb_segment_count = tvp->u.data; c->isdbt_sb_segment_count = tvp->u.data;
break; break;
case DTV_ISDBT_LAYER_ENABLED: case DTV_ISDBT_LAYER_ENABLED:
fe->dtv_property_cache.isdbt_layer_enabled = tvp->u.data; c->isdbt_layer_enabled = tvp->u.data;
break; break;
case DTV_ISDBT_LAYERA_FEC: case DTV_ISDBT_LAYERA_FEC:
fe->dtv_property_cache.layer[0].fec = tvp->u.data; c->layer[0].fec = tvp->u.data;
break; break;
case DTV_ISDBT_LAYERA_MODULATION: case DTV_ISDBT_LAYERA_MODULATION:
fe->dtv_property_cache.layer[0].modulation = tvp->u.data; c->layer[0].modulation = tvp->u.data;
break; break;
case DTV_ISDBT_LAYERA_SEGMENT_COUNT: case DTV_ISDBT_LAYERA_SEGMENT_COUNT:
fe->dtv_property_cache.layer[0].segment_count = tvp->u.data; c->layer[0].segment_count = tvp->u.data;
break; break;
case DTV_ISDBT_LAYERA_TIME_INTERLEAVING: case DTV_ISDBT_LAYERA_TIME_INTERLEAVING:
fe->dtv_property_cache.layer[0].interleaving = tvp->u.data; c->layer[0].interleaving = tvp->u.data;
break; break;
case DTV_ISDBT_LAYERB_FEC: case DTV_ISDBT_LAYERB_FEC:
fe->dtv_property_cache.layer[1].fec = tvp->u.data; c->layer[1].fec = tvp->u.data;
break; break;
case DTV_ISDBT_LAYERB_MODULATION: case DTV_ISDBT_LAYERB_MODULATION:
fe->dtv_property_cache.layer[1].modulation = tvp->u.data; c->layer[1].modulation = tvp->u.data;
break; break;
case DTV_ISDBT_LAYERB_SEGMENT_COUNT: case DTV_ISDBT_LAYERB_SEGMENT_COUNT:
fe->dtv_property_cache.layer[1].segment_count = tvp->u.data; c->layer[1].segment_count = tvp->u.data;
break; break;
case DTV_ISDBT_LAYERB_TIME_INTERLEAVING: case DTV_ISDBT_LAYERB_TIME_INTERLEAVING:
fe->dtv_property_cache.layer[1].interleaving = tvp->u.data; c->layer[1].interleaving = tvp->u.data;
break; break;
case DTV_ISDBT_LAYERC_FEC: case DTV_ISDBT_LAYERC_FEC:
fe->dtv_property_cache.layer[2].fec = tvp->u.data; c->layer[2].fec = tvp->u.data;
break; break;
case DTV_ISDBT_LAYERC_MODULATION: case DTV_ISDBT_LAYERC_MODULATION:
fe->dtv_property_cache.layer[2].modulation = tvp->u.data; c->layer[2].modulation = tvp->u.data;
break; break;
case DTV_ISDBT_LAYERC_SEGMENT_COUNT: case DTV_ISDBT_LAYERC_SEGMENT_COUNT:
fe->dtv_property_cache.layer[2].segment_count = tvp->u.data; c->layer[2].segment_count = tvp->u.data;
break; break;
case DTV_ISDBT_LAYERC_TIME_INTERLEAVING: case DTV_ISDBT_LAYERC_TIME_INTERLEAVING:
fe->dtv_property_cache.layer[2].interleaving = tvp->u.data; c->layer[2].interleaving = tvp->u.data;
break; break;
case DTV_ISDBS_TS_ID: case DTV_ISDBS_TS_ID:
fe->dtv_property_cache.isdbs_ts_id = tvp->u.data; c->isdbs_ts_id = tvp->u.data;
break; break;
case DTV_DVBT2_PLP_ID: case DTV_DVBT2_PLP_ID:
fe->dtv_property_cache.dvbt2_plp_id = tvp->u.data; c->dvbt2_plp_id = tvp->u.data;
break; break;
default: default:
return -EINVAL; return -EINVAL;
...@@ -1487,6 +1489,7 @@ static int dvb_frontend_ioctl(struct file *file, ...@@ -1487,6 +1489,7 @@ static int dvb_frontend_ioctl(struct file *file,
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
struct dvb_frontend *fe = dvbdev->priv; struct dvb_frontend *fe = dvbdev->priv;
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct dvb_frontend_private *fepriv = fe->frontend_priv; struct dvb_frontend_private *fepriv = fe->frontend_priv;
int err = -EOPNOTSUPP; int err = -EOPNOTSUPP;
...@@ -1506,7 +1509,7 @@ static int dvb_frontend_ioctl(struct file *file, ...@@ -1506,7 +1509,7 @@ static int dvb_frontend_ioctl(struct file *file,
if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY)) if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY))
err = dvb_frontend_ioctl_properties(file, cmd, parg); err = dvb_frontend_ioctl_properties(file, cmd, parg);
else { else {
fe->dtv_property_cache.state = DTV_UNDEFINED; c->state = DTV_UNDEFINED;
err = dvb_frontend_ioctl_legacy(file, cmd, parg); err = dvb_frontend_ioctl_legacy(file, cmd, parg);
} }
...@@ -1519,6 +1522,7 @@ static int dvb_frontend_ioctl_properties(struct file *file, ...@@ -1519,6 +1522,7 @@ static int dvb_frontend_ioctl_properties(struct file *file,
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
struct dvb_frontend *fe = dvbdev->priv; struct dvb_frontend *fe = dvbdev->priv;
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
int err = 0; int err = 0;
struct dtv_properties *tvps = NULL; struct dtv_properties *tvps = NULL;
...@@ -1556,7 +1560,7 @@ static int dvb_frontend_ioctl_properties(struct file *file, ...@@ -1556,7 +1560,7 @@ static int dvb_frontend_ioctl_properties(struct file *file,
(tvp + i)->result = err; (tvp + i)->result = err;
} }
if(fe->dtv_property_cache.state == DTV_TUNE) if (c->state == DTV_TUNE)
dprintk("%s() Property cache is full, tuning\n", __func__); dprintk("%s() Property cache is full, tuning\n", __func__);
} else } else
...@@ -1787,9 +1791,10 @@ static int dvb_frontend_ioctl_legacy(struct file *file, ...@@ -1787,9 +1791,10 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
break; break;
case FE_SET_FRONTEND: { case FE_SET_FRONTEND: {
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct dvb_frontend_tune_settings fetunesettings; struct dvb_frontend_tune_settings fetunesettings;
if(fe->dtv_property_cache.state == DTV_TUNE) { if (c->state == DTV_TUNE) {
if (dvb_frontend_check_parameters(fe, &fepriv->parameters_in) < 0) { if (dvb_frontend_check_parameters(fe, &fepriv->parameters_in) < 0) {
err = -EINVAL; err = -EINVAL;
break; break;
......
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