diff options
| author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-12-11 06:00:56 -0500 |
|---|---|---|
| committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-12-15 03:45:21 -0500 |
| commit | 1f31be9ec0a9d59053fb3d78591f6dd7a64a174e (patch) | |
| tree | ce02f6db26542c0188ebdae677a9bd0528c9b66d /scripts | |
| parent | 94d4e1b6021b8d63274c9961c70f95dd2b43e6fb (diff) | |
kconfig: loosen the order of "visible" and "depends on" in menu entry
Currently, "visible" and "depends on", if defined in a menu entry,
must appear in that order.
The real example is in drivers/media/tuners/Kconfig:
menu "Customize TV tuners"
visible if <expr1>
depends on <expr2>
... is fine, but you cannot change the property order like this:
menu "Customize TV tuners"
depends on <expr2>
visible if <expr1>
Kconfig does not require a specific order of properties. In this case,
menu_add_visibility(() and menu_add_dep() are orthogonal.
Loosen this unreasonable restriction.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/kconfig/zconf.y | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index eeb449bd5869..7cc824454e54 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y | |||
| @@ -341,7 +341,7 @@ menu: T_MENU prompt T_EOL | |||
| 341 | printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); | 341 | printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); |
| 342 | }; | 342 | }; |
| 343 | 343 | ||
| 344 | menu_entry: menu visibility_list depends_list | 344 | menu_entry: menu menu_option_list |
| 345 | { | 345 | { |
| 346 | $$ = menu_add_menu(); | 346 | $$ = menu_add_menu(); |
| 347 | }; | 347 | }; |
| @@ -357,6 +357,12 @@ menu_end: end | |||
| 357 | menu_stmt: menu_entry stmt_list menu_end | 357 | menu_stmt: menu_entry stmt_list menu_end |
| 358 | ; | 358 | ; |
| 359 | 359 | ||
| 360 | menu_option_list: | ||
| 361 | /* empty */ | ||
| 362 | | menu_option_list visible | ||
| 363 | | menu_option_list depends | ||
| 364 | ; | ||
| 365 | |||
| 360 | source_stmt: T_SOURCE prompt T_EOL | 366 | source_stmt: T_SOURCE prompt T_EOL |
| 361 | { | 367 | { |
| 362 | printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), $2); | 368 | printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), $2); |
| @@ -414,12 +420,6 @@ depends: T_DEPENDS T_ON expr T_EOL | |||
| 414 | }; | 420 | }; |
| 415 | 421 | ||
| 416 | /* visibility option */ | 422 | /* visibility option */ |
| 417 | |||
| 418 | visibility_list: | ||
| 419 | /* empty */ | ||
| 420 | | visibility_list visible | ||
| 421 | ; | ||
| 422 | |||
| 423 | visible: T_VISIBLE if_expr T_EOL | 423 | visible: T_VISIBLE if_expr T_EOL |
| 424 | { | 424 | { |
| 425 | menu_add_visibility($2); | 425 | menu_add_visibility($2); |
