diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2024-06-18 19:35:24 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2024-07-16 01:08:37 +0900 |
commit | e8fcd915e3c07a2ef90341fa307a224cfd5d865d (patch) | |
tree | a75c6fcf06fb172fb6c1d992b8e1bd953a8aa621 /scripts/kconfig/symbol.c | |
parent | cca318378d6dcb38acd0ba8801b34d1a9be16028 (diff) |
kconfig: change sym_choice_default() to take the choice menu
Change the argument of sym_choice_default() to ease further cleanups.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig/symbol.c')
-rw-r--r-- | scripts/kconfig/symbol.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index 344a241e1e94..3d68ab8e1eb4 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c @@ -255,14 +255,14 @@ static void sym_calc_visibility(struct symbol *sym) * Next locate the first visible choice value * Return NULL if none was found */ -struct symbol *sym_choice_default(struct symbol *sym) +struct symbol *sym_choice_default(struct menu *choice) { struct symbol *def_sym; struct property *prop; struct expr *e; /* any of the defaults visible? */ - for_all_defaults(sym, prop) { + for_all_defaults(choice->sym, prop) { prop->visible.tri = expr_calc_value(prop->visible.expr); if (prop->visible.tri == no) continue; @@ -272,7 +272,7 @@ struct symbol *sym_choice_default(struct symbol *sym) } /* just get the first visible value */ - prop = sym_get_choice_prop(sym); + prop = sym_get_choice_prop(choice->sym); expr_list_for_each_sym(prop->expr, e, def_sym) if (def_sym->visible != no) return def_sym; @@ -312,7 +312,7 @@ struct symbol *sym_calc_choice(struct menu *choice) * explicitly set to 'n'. */ if (!res) { - res = sym_choice_default(choice->sym); + res = sym_choice_default(choice); if (res && sym_has_value(res) && res->def[S_DEF_USER].tri == no) res = NULL; } |