kconfig: use parent->dep as the parentdep of 'menu'

In menu_finalize(), the dependency of a menu entry is propagated
downwards.

For the 'menu', parent->dep and parent->prompt->visible.expr have
the same expression. Both accumulate the 'depends on' of itself and
upper menu entries.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
Masahiro Yamada 2019-12-17 13:14:17 +09:00
parent f64048a20b
commit de026ca915
1 changed files with 3 additions and 5 deletions

View File

@ -326,12 +326,10 @@ void menu_finalize(struct menu *parent)
* choice value symbols. * choice value symbols.
*/ */
parentdep = expr_alloc_symbol(sym); parentdep = expr_alloc_symbol(sym);
} else if (parent->prompt) } else {
/* Menu node for 'menu' */ /* Menu node for 'menu', 'if' */
parentdep = parent->prompt->visible.expr;
else
/* Menu node for 'if' */
parentdep = parent->dep; parentdep = parent->dep;
}
/* For each child menu node... */ /* For each child menu node... */
for (menu = parent->list; menu; menu = menu->next) { for (menu = parent->list; menu; menu = menu->next) {