The patch number 13217 was added via Michael Krufky <mkru...@kernellabs.com> to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward compatible with older kernels. Compatibility modifications will be removed before inclusion into the mainstream Kernel If anyone has any objections, please let us know by sending a message to: Linux Media Mailing List <linux-me...@vger.kernel.org> ------ From: Michael Krufky <mkru...@kernellabs.com> tda18271: handle rf_cal_on_startup properly during attach If rf_cal_on_startup is enabled in the structure passed into tda18271_attach, and the cal module option isn't disabled, then we should run the initialization and calibration procedures during the tda18271_attach function call, regardless of how many instances of the driver have been attached. If the device is already calibrated, the driver will detect that and will only calibrate again if necessary. Priority: normal Signed-off-by: Michael Krufky <mkru...@kernellabs.com> --- linux/drivers/media/common/tuners/tda18271-fe.c | 17 +++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff -r c859a78f46d3 -r 0586f033dac6 linux/drivers/media/common/tuners/tda18271-fe.c --- a/linux/drivers/media/common/tuners/tda18271-fe.c Sat Oct 24 16:47:49 2009 -0400 +++ b/linux/drivers/media/common/tuners/tda18271-fe.c Sat Oct 24 17:18:03 2009 -0400 @@ -1250,7 +1250,7 @@ struct tda18271_config *cfg) { struct tda18271_priv *priv = NULL; - int instance; + int instance, rf_cal_on_startup = 0; mutex_lock(&tda18271_list_mutex); @@ -1263,8 +1263,6 @@ case 1: { /* new tuner instance */ - int rf_cal_on_startup; - fe->tuner_priv = priv; tda18271_setup_configuration(fe, cfg); @@ -1316,7 +1314,20 @@ priv->output_opt = cfg->output_opt; if (cfg->std_map) tda18271_update_std_map(fe, cfg->std_map); + + /* tda18271_cal_on_startup == -1 when cal + * module option is unset */ + if (tda18271_cal_on_startup == -1) { + /* honor attach-time configuration */ + rf_cal_on_startup = + (cfg->rf_cal_on_startup) ? 1 : 0; + } else { + /* module option overrides attach config */ + rf_cal_on_startup = tda18271_cal_on_startup; + } } + if (rf_cal_on_startup) + tda18271_init(fe); break; } --- Patch is available at: http://linuxtv.org/hg/v4l-dvb/rev/0586f033dac663a15ae8637e0a068782aeaab2d3 _______________________________________________ linuxtv-commits mailing list linuxtv-commits@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits