summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/frontends
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2007-02-27 14:43:43 -0800
committerTrent Piepho <xyzzy@speakeasy.org>2007-02-27 14:43:43 -0800
commit27f67f86e77a354a9d98f7286b1b5fde173961b9 (patch)
tree557b92e6e06e42d3f0ccadcd70e3b4c551baccd5 /linux/drivers/media/dvb/frontends
parent1ceb83d7ab23736ad0deb2d794615423af55322a (diff)
downloadmediapointer-dvb-s2-27f67f86e77a354a9d98f7286b1b5fde173961b9.tar.gz
mediapointer-dvb-s2-27f67f86e77a354a9d98f7286b1b5fde173961b9.tar.bz2
dvb-pll: Fix Kconfig files and add support for making dvb-pll optional
From: Trent Piepho <xyzzy@speakeasy.org> 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 <xyzzy@speakeasy.org>
Diffstat (limited to 'linux/drivers/media/dvb/frontends')
-rw-r--r--linux/drivers/media/dvb/frontends/Kconfig6
-rw-r--r--linux/drivers/media/dvb/frontends/dvb-pll.h11
2 files changed, 16 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/frontends/Kconfig b/linux/drivers/media/dvb/frontends/Kconfig
index a205e0b45..b255cbe3a 100644
--- a/linux/drivers/media/dvb/frontends/Kconfig
+++ b/linux/drivers/media/dvb/frontends/Kconfig
@@ -280,8 +280,12 @@ comment "Tuners/PLL support"
depends on DVB_CORE
config DVB_PLL
- tristate
+ tristate "Generic I2C PLL based tuners"
depends on DVB_CORE && I2C
+ default m if DVB_FE_CUSTOMISE
+ help
+ This module driver a number of tuners based on PLL chips with a
+ common I2C interface. Say Y when you want to support these tuners.
config DVB_TDA826X
tristate "Philips TDA826X silicon tuner"
diff --git a/linux/drivers/media/dvb/frontends/dvb-pll.h b/linux/drivers/media/dvb/frontends/dvb-pll.h
index 681186a5e..a5bd928d4 100644
--- a/linux/drivers/media/dvb/frontends/dvb-pll.h
+++ b/linux/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