aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/dvb/frontends/dvb-pll.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/dvb/frontends/dvb-pll.c b/drivers/media/dvb/frontends/dvb-pll.c
index 59ae4ece65ab..5f4762edc405 100644
--- a/drivers/media/dvb/frontends/dvb-pll.c
+++ b/drivers/media/dvb/frontends/dvb-pll.c
@@ -556,6 +556,9 @@ static struct dvb_pll_desc *pll_list[] = {
556/* ----------------------------------------------------------- */ 556/* ----------------------------------------------------------- */
557 557
558struct dvb_pll_priv { 558struct dvb_pll_priv {
559 /* pll number */
560 int nr;
561
559 /* i2c details */ 562 /* i2c details */
560 int pll_i2c_address; 563 int pll_i2c_address;
561 struct i2c_adapter *i2c; 564 struct i2c_adapter *i2c;
@@ -575,6 +578,8 @@ static int debug = 0;
575module_param(debug, int, 0644); 578module_param(debug, int, 0644);
576MODULE_PARM_DESC(debug, "enable verbose debug messages"); 579MODULE_PARM_DESC(debug, "enable verbose debug messages");
577 580
581static unsigned int dvb_pll_devcount;
582
578static int dvb_pll_configure(struct dvb_frontend *fe, u8 *buf, 583static int dvb_pll_configure(struct dvb_frontend *fe, u8 *buf,
579 const struct dvb_frontend_parameters *params) 584 const struct dvb_frontend_parameters *params)
580{ 585{
@@ -787,6 +792,7 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
787 priv->pll_i2c_address = pll_addr; 792 priv->pll_i2c_address = pll_addr;
788 priv->i2c = i2c; 793 priv->i2c = i2c;
789 priv->pll_desc = desc; 794 priv->pll_desc = desc;
795 priv->nr = dvb_pll_devcount++;
790 796
791 memcpy(&fe->ops.tuner_ops, &dvb_pll_tuner_ops, 797 memcpy(&fe->ops.tuner_ops, &dvb_pll_tuner_ops,
792 sizeof(struct dvb_tuner_ops)); 798 sizeof(struct dvb_tuner_ops));
@@ -801,6 +807,14 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
801 fe->ops.tuner_ops.sleep = NULL; 807 fe->ops.tuner_ops.sleep = NULL;
802 808
803 fe->tuner_priv = priv; 809 fe->tuner_priv = priv;
810
811 if (debug) {
812 printk("dvb-pll[%d]", priv->nr);
813 if (i2c != NULL)
814 printk(" %d-%04x", i2c_adapter_id(i2c), pll_addr);
815 printk(": id# %d (%s) attached\n", pll_desc_id, desc->name);
816 }
817
804 return fe; 818 return fe;
805} 819}
806EXPORT_SYMBOL(dvb_pll_attach); 820EXPORT_SYMBOL(dvb_pll_attach);