aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/symbol.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/symbol.c')
-rw-r--r--scripts/kconfig/symbol.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index add068c8e513..a7dfc82fc858 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -247,8 +247,7 @@ static struct symbol *sym_calc_choice(struct symbol *sym)
247 247
248 /* just get the first visible value */ 248 /* just get the first visible value */
249 prop = sym_get_choice_prop(sym); 249 prop = sym_get_choice_prop(sym);
250 for (e = prop->expr; e; e = e->left.expr) { 250 expr_list_for_each_sym(prop->expr, e, def_sym) {
251 def_sym = e->right.sym;
252 sym_calc_visibility(def_sym); 251 sym_calc_visibility(def_sym);
253 if (def_sym->visible != no) 252 if (def_sym->visible != no)
254 return def_sym; 253 return def_sym;
@@ -361,12 +360,14 @@ void sym_calc_value(struct symbol *sym)
361 } 360 }
362 361
363 if (sym_is_choice(sym)) { 362 if (sym_is_choice(sym)) {
363 struct symbol *choice_sym;
364 int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE); 364 int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE);
365
365 prop = sym_get_choice_prop(sym); 366 prop = sym_get_choice_prop(sym);
366 for (e = prop->expr; e; e = e->left.expr) { 367 expr_list_for_each_sym(prop->expr, e, choice_sym) {
367 e->right.sym->flags |= flags; 368 choice_sym->flags |= flags;
368 if (flags & SYMBOL_CHANGED) 369 if (flags & SYMBOL_CHANGED)
369 sym_set_changed(e->right.sym); 370 sym_set_changed(choice_sym);
370 } 371 }
371 } 372 }
372} 373}
@@ -849,7 +850,7 @@ struct property *prop_alloc(enum prop_type type, struct symbol *sym)
849struct symbol *prop_get_symbol(struct property *prop) 850struct symbol *prop_get_symbol(struct property *prop)
850{ 851{
851 if (prop->expr && (prop->expr->type == E_SYMBOL || 852 if (prop->expr && (prop->expr->type == E_SYMBOL ||
852 prop->expr->type == E_CHOICE)) 853 prop->expr->type == E_LIST))
853 return prop->expr->left.sym; 854 return prop->expr->left.sym;
854 return NULL; 855 return NULL;
855} 856}