diff options
Diffstat (limited to 'scripts/kconfig')
-rw-r--r-- | scripts/kconfig/confdata.c | 6 | ||||
-rw-r--r-- | scripts/kconfig/symbol.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index c39327e60ea4..515253fe46cf 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c | |||
@@ -497,7 +497,9 @@ int conf_write_defconfig(const char *filename) | |||
497 | /* | 497 | /* |
498 | * If symbol is a choice value and equals to the | 498 | * If symbol is a choice value and equals to the |
499 | * default for a choice - skip. | 499 | * default for a choice - skip. |
500 | * But only if value is bool and equal to "y" . | 500 | * But only if value is bool and equal to "y" and |
501 | * choice is not "optional". | ||
502 | * (If choice is "optional" then all values can be "n") | ||
501 | */ | 503 | */ |
502 | if (sym_is_choice_value(sym)) { | 504 | if (sym_is_choice_value(sym)) { |
503 | struct symbol *cs; | 505 | struct symbol *cs; |
@@ -505,7 +507,7 @@ int conf_write_defconfig(const char *filename) | |||
505 | 507 | ||
506 | cs = prop_get_symbol(sym_get_choice_prop(sym)); | 508 | cs = prop_get_symbol(sym_get_choice_prop(sym)); |
507 | ds = sym_choice_default(cs); | 509 | ds = sym_choice_default(cs); |
508 | if (sym == ds) { | 510 | if (!sym_is_optional(cs) && sym == ds) { |
509 | if ((sym->type == S_BOOLEAN) && | 511 | if ((sym->type == S_BOOLEAN) && |
510 | sym_get_tristate_value(sym) == yes) | 512 | sym_get_tristate_value(sym) == yes) |
511 | goto next_menu; | 513 | goto next_menu; |
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index e95718fea355..943712ca6c0a 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c | |||
@@ -937,6 +937,8 @@ static void sym_check_print_recursive(struct symbol *last_sym) | |||
937 | sym = stack->sym; | 937 | sym = stack->sym; |
938 | next_sym = stack->next ? stack->next->sym : last_sym; | 938 | next_sym = stack->next ? stack->next->sym : last_sym; |
939 | prop = stack->prop; | 939 | prop = stack->prop; |
940 | if (prop == NULL) | ||
941 | prop = stack->sym->prop; | ||
940 | 942 | ||
941 | /* for choice values find the menu entry (used below) */ | 943 | /* for choice values find the menu entry (used below) */ |
942 | if (sym_is_choice(sym) || sym_is_choice_value(sym)) { | 944 | if (sym_is_choice(sym) || sym_is_choice_value(sym)) { |