aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/common/tuners/xc5000.c9
-rw-r--r--drivers/media/video/tuner-core.c3
2 files changed, 9 insertions, 3 deletions
diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c
index ef4bdf2315f1..b54598550dc4 100644
--- a/drivers/media/common/tuners/xc5000.c
+++ b/drivers/media/common/tuners/xc5000.c
@@ -973,8 +973,6 @@ struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,
973 case 1: 973 case 1:
974 /* new tuner instance */ 974 /* new tuner instance */
975 priv->bandwidth = BANDWIDTH_6_MHZ; 975 priv->bandwidth = BANDWIDTH_6_MHZ;
976 priv->if_khz = cfg->if_khz;
977
978 fe->tuner_priv = priv; 976 fe->tuner_priv = priv;
979 break; 977 break;
980 default: 978 default:
@@ -983,6 +981,13 @@ struct dvb_frontend *xc5000_attach(struct dvb_frontend *fe,
983 break; 981 break;
984 } 982 }
985 983
984 if (priv->if_khz == 0) {
985 /* If the IF hasn't been set yet, use the value provided by
986 the caller (occurs in hybrid devices where the analog
987 call to xc5000_attach occurs before the digital side) */
988 priv->if_khz = cfg->if_khz;
989 }
990
986 /* Check if firmware has been loaded. It is possible that another 991 /* Check if firmware has been loaded. It is possible that another
987 instance of the driver has loaded the firmware. 992 instance of the driver has loaded the firmware.
988 */ 993 */
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 30640fbfd0f9..2a957e2beabf 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -452,7 +452,8 @@ static void set_type(struct i2c_client *c, unsigned int type,
452 struct dvb_tuner_ops *xc_tuner_ops; 452 struct dvb_tuner_ops *xc_tuner_ops;
453 453
454 xc5000_cfg.i2c_address = t->i2c->addr; 454 xc5000_cfg.i2c_address = t->i2c->addr;
455 xc5000_cfg.if_khz = 5380; 455 /* if_khz will be set when the digital dvb_attach() occurs */
456 xc5000_cfg.if_khz = 0;
456 if (!dvb_attach(xc5000_attach, 457 if (!dvb_attach(xc5000_attach,
457 &t->fe, t->i2c->adapter, &xc5000_cfg)) 458 &t->fe, t->i2c->adapter, &xc5000_cfg))
458 goto attach_failed; 459 goto attach_failed;