aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/symbol.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-30 18:13:17 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-30 18:13:17 -0700
commit2b17b4382c4bcb1952e9c6953284044970a274f3 (patch)
tree76999d2060412419fb9997c4efb732a8a7cc89d5 /scripts/kconfig/symbol.c
parentMerge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip (diff)
parentmerge_config.sh: Add option to display redundant configs (diff)
downloadlinux-dev-2b17b4382c4bcb1952e9c6953284044970a274f3.tar.xz
linux-dev-2b17b4382c4bcb1952e9c6953284044970a274f3.zip
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kconfig bits from Michal Marek: "There is one fix for make oldconfig by Arnaud and updates to the merge_config.sh tool." * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: merge_config.sh: Add option to display redundant configs merge_config.sh: Set execute bit merge_config.sh: Use the first file as the initial config kconfig: fix new choices being skipped upon config update
Diffstat (limited to 'scripts/kconfig/symbol.c')
-rw-r--r--scripts/kconfig/symbol.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 071f00c3046e..22a3c400fc41 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -262,11 +262,18 @@ static struct symbol *sym_calc_choice(struct symbol *sym)
struct symbol *def_sym;
struct property *prop;
struct expr *e;
+ int flags;
/* first calculate all choice values' visibilities */
+ flags = sym->flags;
prop = sym_get_choice_prop(sym);
- expr_list_for_each_sym(prop->expr, e, def_sym)
+ expr_list_for_each_sym(prop->expr, e, def_sym) {
sym_calc_visibility(def_sym);
+ if (def_sym->visible != no)
+ flags &= def_sym->flags;
+ }
+
+ sym->flags &= flags | ~SYMBOL_DEF_USER;
/* is the user choice visible? */
def_sym = sym->def[S_DEF_USER].val;