summaryrefslogtreecommitdiff
path: root/scripts/kconfig/menu.c
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2019-12-17 13:14:17 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2020-01-07 02:18:44 +0900
commitde026ca9152c3b3d8c85b8884a29040975ac1424 (patch)
treebc756b4ea6521a73971398531cdac1bff9179ba0 /scripts/kconfig/menu.c
parentf64048a20b0ce1bb1fd5c3f80e82556db73fe08b (diff)
downloadlwn-de026ca9152c3b3d8c85b8884a29040975ac1424.tar.gz
lwn-de026ca9152c3b3d8c85b8884a29040975ac1424.zip
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>
Diffstat (limited to 'scripts/kconfig/menu.c')
-rw-r--r--scripts/kconfig/menu.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index b1b1ee8cf987..bbabf0a59ac4 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/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) {