aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@kernellabs.com>2009-11-01 01:52:01 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 15:41:09 -0500
commit972aacc2989506d9c67f8b710021ff98041363d5 (patch)
treeab00854da847884a1fd0f512b08f6f923267b1e5
parent0700adec9efec3136fa44d90f064c9227817f37b (diff)
V4L/DVB (13262): tda18271: fix regression preventing std map override from taking effect
In the changeset entitled, "tda18271: add support for the set_config method", the initialization order was changed such that the standard map overrides were being applied before loading the default standard map, based on the stepping of the silicon. This changeset restores the proper order by processing the standard map overrides both within the tda18271_set_config() and the tda18271_attach() functions, after we read the id register of the tuner. Thanks to Michael Obst for his testing, helping me to identify the regression. Signed-off-by: Michael Krufky <mkrufky@kernellabs.com> Signed-off-by: Michael Obst <mike.obst@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/common/tuners/tda18271-fe.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/media/common/tuners/tda18271-fe.c b/drivers/media/common/tuners/tda18271-fe.c
index 07d6e1c159ca..b2e15456d5f3 100644
--- a/drivers/media/common/tuners/tda18271-fe.c
+++ b/drivers/media/common/tuners/tda18271-fe.c
@@ -1198,10 +1198,6 @@ static int tda18271_setup_configuration(struct dvb_frontend *fe,
1198 priv->output_opt = (cfg) ? 1198 priv->output_opt = (cfg) ?
1199 cfg->output_opt : TDA18271_OUTPUT_LT_XT_ON; 1199 cfg->output_opt : TDA18271_OUTPUT_LT_XT_ON;
1200 1200
1201 /* override default std map with values in config struct */
1202 if ((cfg) && (cfg->std_map))
1203 tda18271_update_std_map(fe, cfg->std_map);
1204
1205 return 0; 1201 return 0;
1206} 1202}
1207 1203
@@ -1224,6 +1220,10 @@ static int tda18271_set_config(struct dvb_frontend *fe, void *priv_cfg)
1224 if (tda18271_need_cal_on_startup(cfg)) 1220 if (tda18271_need_cal_on_startup(cfg))
1225 tda18271_init(fe); 1221 tda18271_init(fe);
1226 1222
1223 /* override default std map with values in config struct */
1224 if ((cfg) && (cfg->std_map))
1225 tda18271_update_std_map(fe, cfg->std_map);
1226
1227 return 0; 1227 return 0;
1228} 1228}
1229 1229
@@ -1307,6 +1307,10 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,
1307 break; 1307 break;
1308 } 1308 }
1309 1309
1310 /* override default std map with values in config struct */
1311 if ((cfg) && (cfg->std_map))
1312 tda18271_update_std_map(fe, cfg->std_map);
1313
1310 mutex_unlock(&tda18271_list_mutex); 1314 mutex_unlock(&tda18271_list_mutex);
1311 1315
1312 memcpy(&fe->ops.tuner_ops, &tda18271_tuner_ops, 1316 memcpy(&fe->ops.tuner_ops, &tda18271_tuner_ops,