aboutsummaryrefslogtreecommitdiff
path: root/scripts/kconfig/symbol.c
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2005-11-08 21:34:48 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-09 07:55:53 -0800
commit3f23ca2b37d13a89bb6cd0421821fc9c3b8ccd47 (patch)
tree134efbc253baa6aef5c2a39ffc4c5ab66dba7902 /scripts/kconfig/symbol.c
parent3f04e7ddf47a1c821dfaa886161d94774af583fa (diff)
[PATCH] kconfig: fix restart for choice symbols
The restart check whether new symbols became visible, didn't always work for choice symbols. Even if a choice symbol itself isn't changable, the childs are. This also requires to update the new status of all choice values, once one of them is set. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'scripts/kconfig/symbol.c')
-rw-r--r--scripts/kconfig/symbol.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 10d96c4188d..29bff43adc5 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -380,11 +380,22 @@ bool sym_set_tristate_value(struct symbol *sym, tristate val)
sym->flags &= ~SYMBOL_NEW;
sym_set_changed(sym);
}
+ /*
+ * setting a choice value also resets the new flag of the choice
+ * symbol and all other choice values.
+ */
if (sym_is_choice_value(sym) && val == yes) {
struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
+ struct property *prop;
+ struct expr *e;
cs->user.val = sym;
cs->flags &= ~SYMBOL_NEW;
+ prop = sym_get_choice_prop(cs);
+ for (e = prop->expr; e; e = e->left.expr) {
+ if (e->right.sym->visible != no)
+ e->right.sym->flags &= ~SYMBOL_NEW;
+ }
}
sym->user.tri = val;