]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuil...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 2 Jan 2011 18:37:19 +0000 (10:37 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 2 Jan 2011 18:37:19 +0000 (10:37 -0800)
* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  kconfig: fix undesirable side effect of adding "visible" menu attribute

scripts/kconfig/menu.c

index b9d9aa18e6d62bbaa40c34cf7062c00c8bb15e35..5f77dcb8977e0632b5875167d5a652ef62f4be1c 100644 (file)
@@ -140,6 +140,20 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e
                }
                if (current_entry->prompt && current_entry != &rootmenu)
                        prop_warn(prop, "prompt redefined");
+
+               /* Apply all upper menus' visibilities to actual prompts. */
+               if(type == P_PROMPT) {
+                       struct menu *menu = current_entry;
+
+                       while ((menu = menu->parent) != NULL) {
+                               if (!menu->visibility)
+                                       continue;
+                               prop->visible.expr
+                                       = expr_alloc_and(prop->visible.expr,
+                                                        menu->visibility);
+                       }
+               }
+
                current_entry->prompt = prop;
        }
        prop->text = prompt;