]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/meta-ti-glsdk.git/blob - recipes-bsp/linux/linux-omap/linus/0029-kconfig-fix-undesirable-side-effect-of-adding-visibl.patch
2e282cd8821222ddcc646a2f2a05858c0868496e
[glsdk/meta-ti-glsdk.git] / recipes-bsp / linux / linux-omap / linus / 0029-kconfig-fix-undesirable-side-effect-of-adding-visibl.patch
1 From 7ad1227818f09242cfe9bf1845fd24211f5f99bd Mon Sep 17 00:00:00 2001
2 From: Jan Beulich <JBeulich@novell.com>
3 Date: Thu, 9 Dec 2010 08:11:38 +0000
4 Subject: [PATCH 29/66] kconfig: fix undesirable side effect of adding "visible" menu attribute
6 This lead to non-selected, non-user-selectable options to be written
7 out to .config. This is not only pointless, but also preventing the
8 user to be prompted should any of those options eventually become
9 visible (e.g. by de-selecting the *_AUTO options the "visible"
10 attribute was added for.
12 Furthermore it is quite logical for the "visible" attribute of a menu
13 to control the visibility of all contained prompts, which is what the
14 patch does.
16 Signed-off-by: Jan Beulich <jbeulich@novell.com>
17 Signed-off-by: Michal Marek <mmarek@suse.cz>
18 ---
19  scripts/kconfig/menu.c |   14 ++++++++++++++
20  1 files changed, 14 insertions(+), 0 deletions(-)
22 diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
23 index b9d9aa1..5f77dcb 100644
24 --- a/scripts/kconfig/menu.c
25 +++ b/scripts/kconfig/menu.c
26 @@ -140,6 +140,20 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e
27                 }
28                 if (current_entry->prompt && current_entry != &rootmenu)
29                         prop_warn(prop, "prompt redefined");
30 +
31 +               /* Apply all upper menus' visibilities to actual prompts. */
32 +               if(type == P_PROMPT) {
33 +                       struct menu *menu = current_entry;
34 +
35 +                       while ((menu = menu->parent) != NULL) {
36 +                               if (!menu->visibility)
37 +                                       continue;
38 +                               prop->visible.expr
39 +                                       = expr_alloc_and(prop->visible.expr,
40 +                                                        menu->visibility);
41 +                       }
42 +               }
43 +
44                 current_entry->prompt = prop;
45         }
46         prop->text = prompt;
47 -- 
48 1.6.6.1