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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user