Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>

authored by

Trent Piepho and committed by
Mauro Carvalho Chehab
9ab1ba38 982dd1bd

+20 -7
+4
drivers/media/dvb/dvb-usb/Kconfig
··· 33 33 config DVB_USB_DIBUSB_MB 34 34 tristate "DiBcom USB DVB-T devices (based on the DiB3000M-B) (see help for device list)" 35 35 depends on DVB_USB 36 + select DVB_PLL 36 37 select DVB_DIB3000MB 37 38 select DVB_TUNER_MT2060 if !DVB_FE_CUSTOMISE 38 39 help ··· 89 88 config DVB_USB_UMT_010 90 89 tristate "HanfTek UMT-010 DVB-T USB2.0 support" 91 90 depends on DVB_USB 91 + select DVB_PLL 92 92 select DVB_DIB3000MC 93 93 select DVB_TUNER_MT2060 if !DVB_FE_CUSTOMISE 94 94 help ··· 98 96 config DVB_USB_CXUSB 99 97 tristate "Conexant USB2.0 hybrid reference design support" 100 98 depends on DVB_USB 99 + select DVB_PLL 101 100 select DVB_CX22702 if !DVB_FE_CUSTOMISE 102 101 select DVB_LGDT330X if !DVB_FE_CUSTOMISE 103 102 select DVB_TUNER_LGH06XF if !DVB_FE_CUSTOMISE ··· 143 140 config DVB_USB_DIGITV 144 141 tristate "Nebula Electronics uDigiTV DVB-T USB2.0 support" 145 142 depends on DVB_USB 143 + select DVB_PLL 146 144 select DVB_NXT6000 if !DVB_FE_CUSTOMISE 147 145 select DVB_MT352 if !DVB_FE_CUSTOMISE 148 146 help
+5 -1
drivers/media/dvb/frontends/Kconfig
··· 280 280 depends on DVB_CORE 281 281 282 282 config DVB_PLL 283 - tristate 283 + tristate "Generic I2C PLL based tuners" 284 284 depends on DVB_CORE && I2C 285 + default m if DVB_FE_CUSTOMISE 286 + help 287 + This module driver a number of tuners based on PLL chips with a 288 + common I2C interface. Say Y when you want to support these tuners. 285 289 286 290 config DVB_TDA826X 287 291 tristate "Philips TDA826X silicon tuner"
+11
drivers/media/dvb/frontends/dvb-pll.h
··· 59 59 * @param desc dvb_pll_desc to use. 60 60 * @return Frontend pointer on success, NULL on failure 61 61 */ 62 + #if defined(CONFIG_DVB_PLL) || (defined(CONFIG_DVB_PLL_MODULE) && defined(MODULE)) 62 63 extern struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, 63 64 int pll_addr, 64 65 struct i2c_adapter *i2c, 65 66 struct dvb_pll_desc *desc); 67 + #else 68 + static inline struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, 69 + int pll_addr, 70 + struct i2c_adapter *i2c, 71 + struct dvb_pll_desc *desc) 72 + { 73 + printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __FUNCTION__); 74 + return NULL; 75 + } 76 + #endif 66 77 67 78 #endif
-1
drivers/media/dvb/pluto2/Kconfig
··· 2 2 tristate "Pluto2 cards" 3 3 depends on DVB_CORE && PCI && I2C 4 4 select I2C_ALGOBIT 5 - select DVB_PLL 6 5 select DVB_TDA1004X 7 6 help 8 7 Support for PCI cards based on the Pluto2 FPGA like the Satelco
-4
drivers/media/dvb/ttpci/Kconfig
··· 3 3 depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 4 4 select FW_LOADER if !DVB_AV7110_FIRMWARE 5 5 select VIDEO_SAA7146_VV 6 - select DVB_PLL 7 6 select DVB_VES1820 if !DVB_FE_CUSTOMISE 8 7 select DVB_VES1X93 if !DVB_FE_CUSTOMISE 9 8 select DVB_STV0299 if !DVB_FE_CUSTOMISE ··· 61 62 tristate "Budget cards" 62 63 depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 63 64 select VIDEO_SAA7146 64 - select DVB_PLL 65 65 select DVB_STV0299 if !DVB_FE_CUSTOMISE 66 66 select DVB_VES1X93 if !DVB_FE_CUSTOMISE 67 67 select DVB_VES1820 if !DVB_FE_CUSTOMISE ··· 85 87 tristate "Budget cards with onboard CI connector" 86 88 depends on DVB_CORE && PCI && I2C && VIDEO_V4L1 87 89 select VIDEO_SAA7146 88 - select DVB_PLL 89 90 select DVB_STV0297 if !DVB_FE_CUSTOMISE 90 91 select DVB_STV0299 if !DVB_FE_CUSTOMISE 91 92 select DVB_TDA1004X if !DVB_FE_CUSTOMISE ··· 127 130 tristate "AV7110 cards with Budget Patch" 128 131 depends on DVB_CORE && DVB_BUDGET && VIDEO_V4L1 129 132 select DVB_AV7110 130 - select DVB_PLL 131 133 select DVB_STV0299 if !DVB_FE_CUSTOMISE 132 134 select DVB_VES1X93 if !DVB_FE_CUSTOMISE 133 135 select DVB_TDA8083 if !DVB_FE_CUSTOMISE
-1
drivers/media/dvb/ttusb-budget/Kconfig
··· 1 1 config DVB_TTUSB_BUDGET 2 2 tristate "Technotrend/Hauppauge Nova-USB devices" 3 3 depends on DVB_CORE && USB && I2C 4 - select DVB_PLL 5 4 select DVB_CX22700 if !DVB_FE_CUSTOMISE 6 5 select DVB_TDA1004X if !DVB_FE_CUSTOMISE 7 6 select DVB_VES1820 if !DVB_FE_CUSTOMISE