From 9ab1ba38e6a25a480234f196aa26239e28ac2407 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Fri, 27 Apr 2007 12:31:28 -0300 Subject: V4L/DVB (5361): Dvb-pll: Fix Kconfig files and allow dvb-pll to be optional A number of drivers selected DVB_PLL when they did not need it, and some that did need it did not select it. The DVB_PLL option is given a name and help text, so that it will show up in the config menu. DVB_PLL support can be turned on if an out-of-tree driver needs it. The standard dvb fe customization support is added to dvb-pll.h. Since all modules which select DVB_PLL do so unconditionally, it is not possible to turn dvb-pll off when an enabled module selects it, unlike most of the other frontend/tuner drivers. This is because the users of dvb-pll have static references to dvb-pll symbols other than the attach function. If these references are removed, then dvb-pll will be disablable as the other frontend/tuner drivers are. Signed-off-by: Trent Piepho Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/frontends/dvb-pll.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'drivers/media/dvb/frontends/dvb-pll.h') diff --git a/drivers/media/dvb/frontends/dvb-pll.h b/drivers/media/dvb/frontends/dvb-pll.h index 681186a5e5e..a5bd928d420 100644 --- a/drivers/media/dvb/frontends/dvb-pll.h +++ b/drivers/media/dvb/frontends/dvb-pll.h @@ -59,9 +59,20 @@ extern int dvb_pll_configure(struct dvb_pll_desc *desc, u8 *buf, * @param desc dvb_pll_desc to use. * @return Frontend pointer on success, NULL on failure */ +#if defined(CONFIG_DVB_PLL) || (defined(CONFIG_DVB_PLL_MODULE) && defined(MODULE)) extern struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, struct i2c_adapter *i2c, struct dvb_pll_desc *desc); +#else +static inline struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, + int pll_addr, + struct i2c_adapter *i2c, + struct dvb_pll_desc *desc) +{ + printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__); + return NULL; +} +#endif #endif -- cgit v1.2.3