Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174000
b: refs/heads/master
c: c54e1dd
h: refs/heads/master
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent 6a0478d commit a9863a4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 42f9a03ed3ddcccc5372bf4774afc8c4273c6c3a
refs/heads/master: c54e1dde586ea0e930d6c443ca60a9b9d0310de3
28 changes: 25 additions & 3 deletions trunk/drivers/media/common/tuners/tda18271-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1185,10 +1185,10 @@ static int tda18271_get_id(struct dvb_frontend *fe)
return ret;
}

static int tda18271_set_config(struct dvb_frontend *fe, void *priv_cfg)
static int tda18271_setup_configuration(struct dvb_frontend *fe,
struct tda18271_config *cfg)
{
struct tda18271_priv *priv = fe->tuner_priv;
struct tda18271_config *cfg = (struct tda18271_config *) priv_cfg;

priv->gate = (cfg) ? cfg->gate : TDA18271_GATE_AUTO;
priv->role = (cfg) ? cfg->role : TDA18271_MASTER;
Expand All @@ -1205,6 +1205,28 @@ static int tda18271_set_config(struct dvb_frontend *fe, void *priv_cfg)
return 0;
}

static int tda18271_set_config(struct dvb_frontend *fe, void *priv_cfg)
{
struct tda18271_config *cfg = (struct tda18271_config *) priv_cfg;
int rf_cal_on_startup;

tda18271_setup_configuration(fe, cfg);

/* tda18271_cal_on_startup == -1 when cal module option is unset */
if (tda18271_cal_on_startup == -1) {
/* honor configuration setting */
rf_cal_on_startup =
((cfg) && (cfg->rf_cal_on_startup)) ? 1 : 0;
} else {
/* module option overrides configuration setting */
rf_cal_on_startup = tda18271_cal_on_startup;
}
if (rf_cal_on_startup)
tda18271_init(fe);

return 0;
}

static struct dvb_tuner_ops tda18271_tuner_ops = {
.info = {
.name = "NXP TDA18271HD",
Expand Down Expand Up @@ -1244,7 +1266,7 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,

fe->tuner_priv = priv;

tda18271_set_config(fe, cfg);
tda18271_setup_configuration(fe, cfg);

/* tda18271_cal_on_startup == -1 when cal
* module option is unset */
Expand Down

0 comments on commit a9863a4

Please sign in to comment.