diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2007-06-27 17:09:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-06-28 14:34:53 -0400 |
commit | 59faba1b316a7798a33752b3889193333f8af1a0 (patch) | |
tree | aa62041bf8c66f18cb78e97fe6ebfccc0f4d13f7 /drivers | |
parent | 30acbabae38793c9c9acace4de5b1c1889570768 (diff) |
Fix Kconfig dependency problems wrt boolean menuconfigs
If one has a dependency chain (tristate)FOO depends on (bool)BAR depends on
(tristate)BAZ, build problems will result. If BAZ=m, then BAR can be set
y, which allows FOO=y. It's possible to have FOO=y && BAZ=m, which
wouldn't be allowed if FOO depended directly on BAZ. In effect, the bool
promotes the tristate from m to y.
This ends up causing a problem with several menuconfigs that look like:
menuconfig BAR
bool
depends on BAZ [tristate]
if BAR
config FOO
tristate
endif
The solution used here is to add the dependencies of BAR to the if
statement, so that items in the if block will gain a direct
non-bool-promoted dependency on BAZ. This is how it would work if a menu
was used instead of an if block.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: "David S. Miller" <davem@davemloft.net>
Acked-by: Jeff Garzik <jeff@garzik.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/atm/Kconfig | 2 | ||||
-rw-r--r-- | drivers/media/dvb/Kconfig | 2 | ||||
-rw-r--r-- | drivers/media/radio/Kconfig | 2 | ||||
-rw-r--r-- | drivers/media/video/Kconfig | 6 | ||||
-rw-r--r-- | drivers/net/pcmcia/Kconfig | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/drivers/atm/Kconfig b/drivers/atm/Kconfig index f5a47a48c3b4..5b4fab24155f 100644 --- a/drivers/atm/Kconfig +++ b/drivers/atm/Kconfig | |||
@@ -7,7 +7,7 @@ menuconfig ATM_DRIVERS | |||
7 | depends on NETDEVICES && ATM | 7 | depends on NETDEVICES && ATM |
8 | default y | 8 | default y |
9 | 9 | ||
10 | if ATM_DRIVERS | 10 | if ATM_DRIVERS && NETDEVICES && ATM |
11 | 11 | ||
12 | config ATM_DUMMY | 12 | config ATM_DUMMY |
13 | tristate "Dummy ATM driver" | 13 | tristate "Dummy ATM driver" |
diff --git a/drivers/media/dvb/Kconfig b/drivers/media/dvb/Kconfig index efd2b7468158..03ef88acd9b8 100644 --- a/drivers/media/dvb/Kconfig +++ b/drivers/media/dvb/Kconfig | |||
@@ -11,7 +11,7 @@ menuconfig DVB_CAPTURE_DRIVERS | |||
11 | ---help--- | 11 | ---help--- |
12 | Say Y to select Digital TV adapters | 12 | Say Y to select Digital TV adapters |
13 | 13 | ||
14 | if DVB_CAPTURE_DRIVERS | 14 | if DVB_CAPTURE_DRIVERS && DVB_CORE |
15 | 15 | ||
16 | comment "Supported SAA7146 based PCI Adapters" | 16 | comment "Supported SAA7146 based PCI Adapters" |
17 | depends on DVB_CORE && PCI && I2C | 17 | depends on DVB_CORE && PCI && I2C |
diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig index a6ac82a609d4..194b102140ef 100644 --- a/drivers/media/radio/Kconfig +++ b/drivers/media/radio/Kconfig | |||
@@ -9,7 +9,7 @@ menuconfig RADIO_ADAPTERS | |||
9 | ---help--- | 9 | ---help--- |
10 | Say Y here to enable selecting AM/FM radio adapters. | 10 | Say Y here to enable selecting AM/FM radio adapters. |
11 | 11 | ||
12 | if RADIO_ADAPTERS | 12 | if RADIO_ADAPTERS && VIDEO_DEV |
13 | 13 | ||
14 | config RADIO_CADET | 14 | config RADIO_CADET |
15 | tristate "ADS Cadet AM/FM Tuner" | 15 | tristate "ADS Cadet AM/FM Tuner" |
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index 4cca55170e21..4d45a40016de 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -11,7 +11,7 @@ menuconfig VIDEO_CAPTURE_DRIVERS | |||
11 | webcams, analog TV, and hybrid analog/digital TV. | 11 | webcams, analog TV, and hybrid analog/digital TV. |
12 | Some of those devices also supports FM radio. | 12 | Some of those devices also supports FM radio. |
13 | 13 | ||
14 | if VIDEO_CAPTURE_DRIVERS | 14 | if VIDEO_CAPTURE_DRIVERS && VIDEO_DEV |
15 | 15 | ||
16 | config VIDEO_ADV_DEBUG | 16 | config VIDEO_ADV_DEBUG |
17 | bool "Enable advanced debug functionality" | 17 | bool "Enable advanced debug functionality" |
@@ -347,7 +347,7 @@ endmenu # encoder / decoder chips | |||
347 | 347 | ||
348 | config VIDEO_VIVI | 348 | config VIDEO_VIVI |
349 | tristate "Virtual Video Driver" | 349 | tristate "Virtual Video Driver" |
350 | depends on VIDEO_V4L2 && !SPARC32 && !SPARC64 && PCI && VIDEO_DEV | 350 | depends on VIDEO_V4L2 && !SPARC32 && !SPARC64 && PCI |
351 | select VIDEO_BUF | 351 | select VIDEO_BUF |
352 | default n | 352 | default n |
353 | ---help--- | 353 | ---help--- |
@@ -691,7 +691,7 @@ menuconfig V4L_USB_DRIVERS | |||
691 | depends on USB | 691 | depends on USB |
692 | default y | 692 | default y |
693 | 693 | ||
694 | if V4L_USB_DRIVERS | 694 | if V4L_USB_DRIVERS && USB |
695 | 695 | ||
696 | source "drivers/media/video/pvrusb2/Kconfig" | 696 | source "drivers/media/video/pvrusb2/Kconfig" |
697 | 697 | ||
diff --git a/drivers/net/pcmcia/Kconfig b/drivers/net/pcmcia/Kconfig index 5d658bc9791c..e8f55d8ed7a9 100644 --- a/drivers/net/pcmcia/Kconfig +++ b/drivers/net/pcmcia/Kconfig | |||
@@ -19,7 +19,7 @@ menuconfig NET_PCMCIA | |||
19 | 19 | ||
20 | If unsure, say N. | 20 | If unsure, say N. |
21 | 21 | ||
22 | if NET_PCMCIA | 22 | if NET_PCMCIA && PCMCIA |
23 | 23 | ||
24 | config PCMCIA_3C589 | 24 | config PCMCIA_3C589 |
25 | tristate "3Com 3c589 PCMCIA support" | 25 | tristate "3Com 3c589 PCMCIA support" |