From c3f3b6c027526cab686d438c6db682067ff0ce1e Mon Sep 17 00:00:00 2001 From: Devin Heitmueller Date: Wed, 11 Mar 2009 02:58:53 -0300 Subject: [PATCH] --- yaml --- r: 138193 b: refs/heads/master c: ea2278633ab4728c41b4043f47df4d3e39131992 h: refs/heads/master i: 138191: 3c2d5084a8c64d314f3ca138f1a3e8e461bceb72 v: v3 --- [refs] | 2 +- trunk/drivers/media/common/tuners/xc5000.c | 9 +++++++-- trunk/drivers/media/video/tuner-core.c | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 12e7be532540..8b0016e1d078 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e9d4a6d5ef58a700d3add96ffb984741c6e34fff +refs/heads/master: ea2278633ab4728c41b4043f47df4d3e39131992 diff --git a/trunk/drivers/media/common/tuners/xc5000.c b/trunk/drivers/media/common/tuners/xc5000.c index ef4bdf2315f1..b54598550dc4 100644 --- a/trunk/drivers/media/common/tuners/xc5000.c +++ b/trunk/drivers/media/common/tuners/xc5000.c @@ -973,8 +973,6 @@ struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe, case 1: /* new tuner instance */ priv->bandwidth = BANDWIDTH_6_MHZ; - priv->if_khz = cfg->if_khz; - fe->tuner_priv = priv; break; default: @@ -983,6 +981,13 @@ struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe, break; } + if (priv->if_khz == 0) { + /* If the IF hasn't been set yet, use the value provided by + the caller (occurs in hybrid devices where the analog + call to xc5000_attach occurs before the digital side) */ + priv->if_khz = cfg->if_khz; + } + /* Check if firmware has been loaded. It is possible that another instance of the driver has loaded the firmware. */ diff --git a/trunk/drivers/media/video/tuner-core.c b/trunk/drivers/media/video/tuner-core.c index 30640fbfd0f9..2a957e2beabf 100644 --- a/trunk/drivers/media/video/tuner-core.c +++ b/trunk/drivers/media/video/tuner-core.c @@ -452,7 +452,8 @@ static void set_type(struct i2c_client *c, unsigned int type, struct dvb_tuner_ops *xc_tuner_ops; xc5000_cfg.i2c_address = t->i2c->addr; - xc5000_cfg.if_khz = 5380; + /* if_khz will be set when the digital dvb_attach() occurs */ + xc5000_cfg.if_khz = 0; if (!dvb_attach(xc5000_attach, &t->fe, t->i2c->adapter, &xc5000_cfg)) goto attach_failed;