Skip to content

Commit

Permalink
V4L/DVB (12867): tda18271: ensure that configuration options are set …
Browse files Browse the repository at this point in the history
…for multiple instances

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.

Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Sep 19, 2009
1 parent 1216531 commit d5abef6
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions drivers/media/common/tuners/tda18271-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1258,9 +1258,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;
}

Expand Down

0 comments on commit d5abef6

Please sign in to comment.