Skip to content

Commit 609fc40

Browse files
committed
kconfig: use sym_get_choice_menu() in sym_check_choice_deps()
Choices and their members are associated via the P_CHOICE property. Currently, prop_get_symbol(sym_get_choice_prop()) is used to obtain the choice of the given choice member. Replace it with sym_get_choice_menu(), which retrieves the choice without relying on P_CHOICE. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent d8f8bbc commit 609fc40

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

scripts/kconfig/symbol.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,9 +1280,13 @@ static struct symbol *sym_check_choice_deps(struct symbol *choice)
12801280
if (menu->sym)
12811281
menu->sym->flags &= ~SYMBOL_CHECK;
12821282

1283-
if (sym2 && sym_is_choice_value(sym2) &&
1284-
prop_get_symbol(sym_get_choice_prop(sym2)) == choice)
1285-
sym2 = choice;
1283+
if (sym2) {
1284+
struct menu *choice_menu2;
1285+
1286+
choice_menu2 = sym_get_choice_menu(sym2);
1287+
if (choice_menu2 == choice_menu)
1288+
sym2 = choice;
1289+
}
12861290

12871291
dep_stack_remove();
12881292

0 commit comments

Comments
 (0)