diff options
Diffstat (limited to 'drivers/media/common')
-rw-r--r-- | drivers/media/common/tuners/tda18271-fe.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/media/common/tuners/tda18271-fe.c b/drivers/media/common/tuners/tda18271-fe.c index 24f1d38081e6..8b934f48b6f3 100644 --- a/drivers/media/common/tuners/tda18271-fe.c +++ b/drivers/media/common/tuners/tda18271-fe.c | |||
@@ -1249,7 +1249,7 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr, | |||
1249 | struct tda18271_config *cfg) | 1249 | struct tda18271_config *cfg) |
1250 | { | 1250 | { |
1251 | struct tda18271_priv *priv = NULL; | 1251 | struct tda18271_priv *priv = NULL; |
1252 | int instance; | 1252 | int instance, rf_cal_on_startup = 0; |
1253 | 1253 | ||
1254 | mutex_lock(&tda18271_list_mutex); | 1254 | mutex_lock(&tda18271_list_mutex); |
1255 | 1255 | ||
@@ -1262,8 +1262,6 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr, | |||
1262 | case 1: | 1262 | case 1: |
1263 | { | 1263 | { |
1264 | /* new tuner instance */ | 1264 | /* new tuner instance */ |
1265 | int rf_cal_on_startup; | ||
1266 | |||
1267 | fe->tuner_priv = priv; | 1265 | fe->tuner_priv = priv; |
1268 | 1266 | ||
1269 | tda18271_setup_configuration(fe, cfg); | 1267 | tda18271_setup_configuration(fe, cfg); |
@@ -1315,7 +1313,20 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr, | |||
1315 | priv->output_opt = cfg->output_opt; | 1313 | priv->output_opt = cfg->output_opt; |
1316 | if (cfg->std_map) | 1314 | if (cfg->std_map) |
1317 | tda18271_update_std_map(fe, cfg->std_map); | 1315 | tda18271_update_std_map(fe, cfg->std_map); |
1316 | |||
1317 | /* tda18271_cal_on_startup == -1 when cal | ||
1318 | * module option is unset */ | ||
1319 | if (tda18271_cal_on_startup == -1) { | ||
1320 | /* honor attach-time configuration */ | ||
1321 | rf_cal_on_startup = | ||
1322 | (cfg->rf_cal_on_startup) ? 1 : 0; | ||
1323 | } else { | ||
1324 | /* module option overrides attach config */ | ||
1325 | rf_cal_on_startup = tda18271_cal_on_startup; | ||
1326 | } | ||
1318 | } | 1327 | } |
1328 | if (rf_cal_on_startup) | ||
1329 | tda18271_init(fe); | ||
1319 | break; | 1330 | break; |
1320 | } | 1331 | } |
1321 | 1332 | ||