aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@linuxtv.org>2011-05-08 19:03:35 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-20 18:51:22 -0400
commit15cc2bb385ced95be35d13895a67bfe52066778c (patch)
tree14650886b7d6868c6275f7373cb514756e9f8de0
parent7285d4cc2cd4199a5b831a451511ccd6595806fd (diff)
[media] DVB: dtv_property_cache_submit shouldn't modifiy the cache
- Use const pointers and remove assignments. - delivery_system already gets assigned by DTV_DELIVERY_SYSTEM and dtv_property_cache_sync. Signed-off-by: Andreas Oberritter <obi@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 3639edce65e..67558bd26d8 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -1074,7 +1074,7 @@ static void dtv_property_cache_sync(struct dvb_frontend *fe,
1074 */ 1074 */
1075static void dtv_property_legacy_params_sync(struct dvb_frontend *fe) 1075static void dtv_property_legacy_params_sync(struct dvb_frontend *fe)
1076{ 1076{
1077 struct dtv_frontend_properties *c = &fe->dtv_property_cache; 1077 const struct dtv_frontend_properties *c = &fe->dtv_property_cache;
1078 struct dvb_frontend_private *fepriv = fe->frontend_priv; 1078 struct dvb_frontend_private *fepriv = fe->frontend_priv;
1079 struct dvb_frontend_parameters *p = &fepriv->parameters; 1079 struct dvb_frontend_parameters *p = &fepriv->parameters;
1080 1080
@@ -1086,14 +1086,12 @@ static void dtv_property_legacy_params_sync(struct dvb_frontend *fe)
1086 dprintk("%s() Preparing QPSK req\n", __func__); 1086 dprintk("%s() Preparing QPSK req\n", __func__);
1087 p->u.qpsk.symbol_rate = c->symbol_rate; 1087 p->u.qpsk.symbol_rate = c->symbol_rate;
1088 p->u.qpsk.fec_inner = c->fec_inner; 1088 p->u.qpsk.fec_inner = c->fec_inner;
1089 c->delivery_system = SYS_DVBS;
1090 break; 1089 break;
1091 case FE_QAM: 1090 case FE_QAM:
1092 dprintk("%s() Preparing QAM req\n", __func__); 1091 dprintk("%s() Preparing QAM req\n", __func__);
1093 p->u.qam.symbol_rate = c->symbol_rate; 1092 p->u.qam.symbol_rate = c->symbol_rate;
1094 p->u.qam.fec_inner = c->fec_inner; 1093 p->u.qam.fec_inner = c->fec_inner;
1095 p->u.qam.modulation = c->modulation; 1094 p->u.qam.modulation = c->modulation;
1096 c->delivery_system = SYS_DVBC_ANNEX_AC;
1097 break; 1095 break;
1098 case FE_OFDM: 1096 case FE_OFDM:
1099 dprintk("%s() Preparing OFDM req\n", __func__); 1097 dprintk("%s() Preparing OFDM req\n", __func__);
@@ -1111,15 +1109,10 @@ static void dtv_property_legacy_params_sync(struct dvb_frontend *fe)
1111 p->u.ofdm.transmission_mode = c->transmission_mode; 1109 p->u.ofdm.transmission_mode = c->transmission_mode;
1112 p->u.ofdm.guard_interval = c->guard_interval; 1110 p->u.ofdm.guard_interval = c->guard_interval;
1113 p->u.ofdm.hierarchy_information = c->hierarchy; 1111 p->u.ofdm.hierarchy_information = c->hierarchy;
1114 c->delivery_system = SYS_DVBT;
1115 break; 1112 break;
1116 case FE_ATSC: 1113 case FE_ATSC:
1117 dprintk("%s() Preparing VSB req\n", __func__); 1114 dprintk("%s() Preparing VSB req\n", __func__);
1118 p->u.vsb.modulation = c->modulation; 1115 p->u.vsb.modulation = c->modulation;
1119 if ((c->modulation == VSB_8) || (c->modulation == VSB_16))
1120 c->delivery_system = SYS_ATSC;
1121 else
1122 c->delivery_system = SYS_DVBC_ANNEX_B;
1123 break; 1116 break;
1124 } 1117 }
1125} 1118}
@@ -1129,7 +1122,7 @@ static void dtv_property_legacy_params_sync(struct dvb_frontend *fe)
1129 */ 1122 */
1130static void dtv_property_adv_params_sync(struct dvb_frontend *fe) 1123static void dtv_property_adv_params_sync(struct dvb_frontend *fe)
1131{ 1124{
1132 struct dtv_frontend_properties *c = &fe->dtv_property_cache; 1125 const struct dtv_frontend_properties *c = &fe->dtv_property_cache;
1133 struct dvb_frontend_private *fepriv = fe->frontend_priv; 1126 struct dvb_frontend_private *fepriv = fe->frontend_priv;
1134 struct dvb_frontend_parameters *p = &fepriv->parameters; 1127 struct dvb_frontend_parameters *p = &fepriv->parameters;
1135 1128
@@ -1170,7 +1163,7 @@ static void dtv_property_adv_params_sync(struct dvb_frontend *fe)
1170 1163
1171static void dtv_property_cache_submit(struct dvb_frontend *fe) 1164static void dtv_property_cache_submit(struct dvb_frontend *fe)
1172{ 1165{
1173 struct dtv_frontend_properties *c = &fe->dtv_property_cache; 1166 const struct dtv_frontend_properties *c = &fe->dtv_property_cache;
1174 1167
1175 /* For legacy delivery systems we don't need the delivery_system to 1168 /* For legacy delivery systems we don't need the delivery_system to
1176 * be specified, but we populate the older structures from the cache 1169 * be specified, but we populate the older structures from the cache