summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@kernellabs.com>2009-08-30 02:07:10 -0400
committerMichael Krufky <mkrufky@kernellabs.com>2009-08-30 02:07:10 -0400
commit75c4b5f8a5f960190e5f8df3d9e0fbd615313bd2 (patch)
tree8863fc6789a03ab87380a8b131b2e5f06fbd48f9
parenta742aa93fac3bc19f1f9fa7d2e602d31143d0195 (diff)
downloadmediapointer-dvb-s2-75c4b5f8a5f960190e5f8df3d9e0fbd615313bd2.tar.gz
mediapointer-dvb-s2-75c4b5f8a5f960190e5f8df3d9e0fbd615313bd2.tar.bz2
tda18271: ensure that configuration options are set for multiple instances
From: Michael Krufky <mkrufky@kernellabs.com> For the case of multiple tuner instances, ensure that non-default configuration options are saved into the driver's state. This resolves an issue where a configuration option may not be carried into the driver if the analog side of a hybrid driver initializes before the digital side. Priority: normal Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
-rw-r--r--linux/drivers/media/common/tuners/tda18271-fe.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/linux/drivers/media/common/tuners/tda18271-fe.c b/linux/drivers/media/common/tuners/tda18271-fe.c
index 3ad9f3435..56bab7c28 100644
--- a/linux/drivers/media/common/tuners/tda18271-fe.c
+++ b/linux/drivers/media/common/tuners/tda18271-fe.c
@@ -1259,9 +1259,19 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,
/* existing tuner instance */
fe->tuner_priv = priv;
- /* allow dvb driver to override i2c gate setting */
- if ((cfg) && (cfg->gate != TDA18271_GATE_ANALOG))
- priv->gate = cfg->gate;
+ /* allow dvb driver to override configuration settings */
+ if (cfg) {
+ if (cfg->gate != TDA18271_GATE_ANALOG)
+ priv->gate = cfg->gate;
+ if (cfg->role)
+ priv->role = cfg->role;
+ if (cfg->config)
+ priv->config = cfg->config;
+ if (cfg->small_i2c)
+ priv->small_i2c = cfg->small_i2c;
+ if (cfg->output_opt)
+ priv->output_opt = cfg->output_opt;
+ }
break;
}