kconfig: fix choice multi-display
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue May 10 22:45:33 2011 +0200 (2011-05-10)
changeset 2451d83221161129
parent 2450 68cc5a0d3191
child 2452 ff170381d13a
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" <yann.morin.1998@anciens.enib.fr>
kconfig/menu.c
     1.1 --- a/kconfig/menu.c	Sun May 08 15:12:55 2011 +0200
     1.2 +++ b/kconfig/menu.c	Tue May 10 22:45:33 2011 +0200
     1.3 @@ -285,6 +285,11 @@
     1.4  					}
     1.5  				}
     1.6  			}
     1.7 +			if (parent->prompt &&
     1.8 +			    !expr_is_yes(parent->prompt->visible.expr)) {
     1.9 +				parent->visibility = expr_alloc_and (parent->visibility,
    1.10 +								     parent->prompt->visible.expr);
    1.11 +			}
    1.12  			/* set the type of the remaining choice values */
    1.13  			for (menu = parent->list; menu; menu = menu->next) {
    1.14  				current_entry = menu;