aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tuner-simple.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/tuner-simple.c')
-rw-r--r--drivers/media/video/tuner-simple.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/video/tuner-simple.c b/drivers/media/video/tuner-simple.c
index d3362703e258..de0b291459f7 100644
--- a/drivers/media/video/tuner-simple.c
+++ b/drivers/media/video/tuner-simple.c
@@ -684,7 +684,7 @@ static struct dvb_tuner_ops simple_tuner_ops = {
684struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe, 684struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe,
685 struct i2c_adapter *i2c_adap, 685 struct i2c_adapter *i2c_adap,
686 u8 i2c_addr, 686 u8 i2c_addr,
687 struct simple_tuner_config *cfg) 687 unsigned int type)
688{ 688{
689 struct tuner_simple_priv *priv = NULL; 689 struct tuner_simple_priv *priv = NULL;
690 690
@@ -701,15 +701,15 @@ struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe,
701 701
702 priv->i2c_props.addr = i2c_addr; 702 priv->i2c_props.addr = i2c_addr;
703 priv->i2c_props.adap = i2c_adap; 703 priv->i2c_props.adap = i2c_adap;
704 priv->type = cfg->type; 704 priv->type = type;
705 priv->tun = cfg->tun; 705 priv->tun = &tuners[type];
706 706
707 memcpy(&fe->ops.tuner_ops, &simple_tuner_ops, 707 memcpy(&fe->ops.tuner_ops, &simple_tuner_ops,
708 sizeof(struct dvb_tuner_ops)); 708 sizeof(struct dvb_tuner_ops));
709 709
710 tuner_info("type set to %d (%s)\n", cfg->type, cfg->tun->name); 710 tuner_info("type set to %d (%s)\n", priv->type, priv->tun->name);
711 711
712 strlcpy(fe->ops.tuner_ops.info.name, cfg->tun->name, 712 strlcpy(fe->ops.tuner_ops.info.name, priv->tun->name,
713 sizeof(fe->ops.tuner_ops.info.name)); 713 sizeof(fe->ops.tuner_ops.info.name));
714 714
715 return fe; 715 return fe;