From bb27382f3b749bf01fcfcce77340c7cf705247ef Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Tue, 10 May 2011 22:45:33 +0200 Subject: kconfig: fix choice multi-display In case a choices has different combinations, it can be displayed more than once. See the discussion thread on the linux-kbuild ML: http://www.spinics.net/lists/linux-kbuild/msg04709.html The fix applied here was proposed by Arnaud LACOMBE. That fix, or a similar one, will probably be pushed upstream soon. Signed-off-by: "Yann E. MORIN" diff --git a/kconfig/menu.c b/kconfig/menu.c index 7ec2522..8cb7a57 100644 --- a/kconfig/menu.c +++ b/kconfig/menu.c @@ -285,6 +285,11 @@ void menu_finalize(struct menu *parent) } } } + if (parent->prompt && + !expr_is_yes(parent->prompt->visible.expr)) { + parent->visibility = expr_alloc_and (parent->visibility, + parent->prompt->visible.expr); + } /* set the type of the remaining choice values */ for (menu = parent->list; menu; menu = menu->next) { current_entry = menu; -- cgit v0.10.2-6-g49f6