From 59faba1b316a7798a33752b3889193333f8af1a0 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Wed, 27 Jun 2007 14:09:54 -0700 Subject: 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 Acked-by: Mauro Carvalho Chehab Cc: "David S. Miller" Acked-by: Jeff Garzik Cc: Dominik Brodowski Cc: Chas Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/media/video/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/media/video/Kconfig') diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index 4cca55170e2..4d45a40016d 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig @@ -11,7 +11,7 @@ menuconfig VIDEO_CAPTURE_DRIVERS webcams, analog TV, and hybrid analog/digital TV. Some of those devices also supports FM radio. -if VIDEO_CAPTURE_DRIVERS +if VIDEO_CAPTURE_DRIVERS && VIDEO_DEV config VIDEO_ADV_DEBUG bool "Enable advanced debug functionality" @@ -347,7 +347,7 @@ endmenu # encoder / decoder chips config VIDEO_VIVI tristate "Virtual Video Driver" - depends on VIDEO_V4L2 && !SPARC32 && !SPARC64 && PCI && VIDEO_DEV + depends on VIDEO_V4L2 && !SPARC32 && !SPARC64 && PCI select VIDEO_BUF default n ---help--- @@ -691,7 +691,7 @@ menuconfig V4L_USB_DRIVERS depends on USB default y -if V4L_USB_DRIVERS +if V4L_USB_DRIVERS && USB source "drivers/media/video/pvrusb2/Kconfig" -- cgit v1.2.3