Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 204846
b: refs/heads/master
c: 0a28c47
h: refs/heads/master
v: v3
  • Loading branch information
Jan Beulich authored and Michal Marek committed Jul 8, 2010
1 parent f0b11bf commit 9c418c7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 246cf9c26bf11f2bffbecea6e5bd222eee7b1df8
refs/heads/master: 0a28c47b8db8ff74d1bfbc5c5ad0100cea472351
24 changes: 12 additions & 12 deletions trunk/scripts/kconfig/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,32 +232,31 @@ static struct symbol *sym_calc_choice(struct symbol *sym)
struct property *prop;
struct expr *e;

/* first calculate all choice values' visibilities */
prop = sym_get_choice_prop(sym);
expr_list_for_each_sym(prop->expr, e, def_sym)
sym_calc_visibility(def_sym);

/* is the user choice visible? */
def_sym = sym->def[S_DEF_USER].val;
if (def_sym) {
sym_calc_visibility(def_sym);
if (def_sym->visible != no)
return def_sym;
}
if (def_sym && def_sym->visible != no)
return def_sym;

/* any of the defaults visible? */
for_all_defaults(sym, prop) {
prop->visible.tri = expr_calc_value(prop->visible.expr);
if (prop->visible.tri == no)
continue;
def_sym = prop_get_symbol(prop);
sym_calc_visibility(def_sym);
if (def_sym->visible != no)
return def_sym;
}

/* just get the first visible value */
prop = sym_get_choice_prop(sym);
expr_list_for_each_sym(prop->expr, e, def_sym) {
sym_calc_visibility(def_sym);
expr_list_for_each_sym(prop->expr, e, def_sym)
if (def_sym->visible != no)
return def_sym;
}

/* no choice? reset tristate value */
sym->curr.tri = no;
Expand Down Expand Up @@ -383,12 +382,13 @@ void sym_calc_value(struct symbol *sym)

if (sym_is_choice(sym)) {
struct symbol *choice_sym;
int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE);

prop = sym_get_choice_prop(sym);
expr_list_for_each_sym(prop->expr, e, choice_sym) {
choice_sym->flags |= flags;
if (flags & SYMBOL_CHANGED)
if ((sym->flags & SYMBOL_WRITE) &&
choice_sym->visible != no)
choice_sym->flags |= SYMBOL_WRITE;
if (sym->flags & SYMBOL_CHANGED)
sym_set_changed(choice_sym);
}
}
Expand Down

0 comments on commit 9c418c7

Please sign in to comment.