diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-09-08 01:11:15 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-10 05:14:45 +0400 |
commit | a27e5e769e46626052fc18ff63f274ee97142bab (patch) | |
tree | cb862da7906c82ae8258548fbad207dd0eb6d67e /drivers/media/dvb | |
parent | 5d7802b2617d785ea0b8631b0605defc19ee6561 (diff) | |
download | linux-a27e5e769e46626052fc18ff63f274ee97142bab.tar.xz |
V4L/DVB (6227): dvb-pll: store instance ID in dvb_pll_priv structure
Store an instance ID in the dvb_pll_priv structure, so that module options
specific to a given pll may be used by the functions within the driver.
When debug is turned on, print a message indicating which pll was attached
and it's instance id.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/frontends/dvb-pll.c | 14 |
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[] = { /* ----------------------------------------------------------- */ struct dvb_pll_priv { + /* pll number */ + int nr; + /* i2c details */ int pll_i2c_address; struct i2c_adapter *i2c; @@ -575,6 +578,8 @@ static int debug = 0; module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "enable verbose debug messages"); +static unsigned int dvb_pll_devcount; + static int dvb_pll_configure(struct dvb_frontend *fe, u8 *buf, const struct dvb_frontend_parameters *params) { @@ -787,6 +792,7 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, priv->pll_i2c_address = pll_addr; priv->i2c = i2c; priv->pll_desc = desc; + priv->nr = dvb_pll_devcount++; memcpy(&fe->ops.tuner_ops, &dvb_pll_tuner_ops, sizeof(struct dvb_tuner_ops)); @@ -801,6 +807,14 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, fe->ops.tuner_ops.sleep = NULL; fe->tuner_priv = priv; + + if (debug) { + printk("dvb-pll[%d]", priv->nr); + if (i2c != NULL) + printk(" %d-%04x", i2c_adapter_id(i2c), pll_addr); + printk(": id# %d (%s) attached\n", pll_desc_id, desc->name); + } + return fe; } EXPORT_SYMBOL(dvb_pll_attach); |