diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 9d1f2adf228919771fe440c2201e1726554df0c6..eef17bacb6bca6aab1d9096a28690d701f7bea2b 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -419,9 +419,13 @@ bool menu_is_visible(struct menu *menu) if (!sym || sym_get_tristate_value(menu->sym) == no) return false; - for (child = menu->list; child; child = child->next) - if (menu_is_visible(child)) + for (child = menu->list; child; child = child->next) { + if (menu_is_visible(child)) { + if (sym) + sym->flags |= SYMBOL_DEF_USER; return true; + } + } return false; }