diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2024-03-03 13:00:33 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2024-03-09 15:01:00 +0900 |
commit | e0492219a6d752942b054cbfbbcbc1e8ab294d26 (patch) | |
tree | 152e81501cac71ee57ea0d51017c4d8916e74715 /scripts/kconfig/expr.h | |
parent | 50a339981780e233a5be88b9116a6dfd0e00231a (diff) |
kconfig: link menus to a symbol
Currently, there is no direct link from (struct symbol) to (struct menu).
It is still possible to access associated menus through the P_SYMBOL
property, because property::menu is the relevant menu entry, but it
results in complex code, as seen in get_symbol_str().
Use a linked list for simpler traversal of relevant menus.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Diffstat (limited to 'scripts/kconfig/expr.h')
-rw-r--r-- | scripts/kconfig/expr.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index 3bc375f1a1cd..0158f5eac454 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h @@ -108,6 +108,9 @@ struct symbol { */ tristate visible; + /* config entries associated with this symbol */ + struct list_head menus; + /* SYMBOL_* flags */ int flags; @@ -222,6 +225,8 @@ struct menu { */ struct symbol *sym; + struct list_head link; /* link to symbol::menus */ + /* * The prompt associated with the node. This holds the prompt for a * symbol as well as the text for a menu or comment, along with the |