summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/conf.c7
-rw-r--r--scripts/kconfig/symbol.c11
2 files changed, 14 insertions, 4 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index bc20cab9d0d6..dffbf2ea1f9d 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -467,15 +467,14 @@ static void check_conf(struct menu *menu)
return;
sym = menu->sym;
- if (sym) {
- if (sym_is_changable(sym) && !sym_has_value(sym)) {
+ if (sym && !sym_has_value(sym)) {
+ if (sym_is_changable(sym) ||
+ (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) {
if (!conf_cnt++)
printf(_("*\n* Restart config...\n*\n"));
rootEntry = menu_get_parent_menu(menu);
conf(rootEntry);
}
- if (sym_is_choice(sym) && sym_get_tristate_value(sym) != mod)
- return;
}
for (child = menu->list; child; child = child->next)
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 10d96c4188dd..29bff43adc5e 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;