From: Masahiro Yamada Date: Tue, 17 Dec 2019 04:14:17 +0000 (+0900) Subject: kconfig: use parent->dep as the parentdep of 'menu' X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=42edd7729207214913a48ec926f3cc76906833b3;p=carl9170fw.git 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 Signed-off-by: Christian Lamparter --- diff --git a/config/menu.c b/config/menu.c index b1b1ee8..bbabf0a 100644 --- a/config/menu.c +++ b/config/menu.c @@ -326,12 +326,10 @@ void menu_finalize(struct menu *parent) * choice value symbols. */ parentdep = expr_alloc_symbol(sym); - } else if (parent->prompt) - /* Menu node for 'menu' */ - parentdep = parent->prompt->visible.expr; - else - /* Menu node for 'if' */ + } else { + /* Menu node for 'menu', 'if' */ parentdep = parent->dep; + } /* For each child menu node... */ for (menu = parent->list; menu; menu = menu->next) {