diff options
Diffstat (limited to 'scripts/kconfig/symbol.c')
-rw-r--r-- | scripts/kconfig/symbol.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index 4ea0050dcb16..78a60ba39e54 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c | |||
@@ -426,8 +426,8 @@ bool sym_set_tristate_value(struct symbol *sym, tristate val) | |||
426 | if (oldval != val && !sym_tristate_within_range(sym, val)) | 426 | if (oldval != val && !sym_tristate_within_range(sym, val)) |
427 | return false; | 427 | return false; |
428 | 428 | ||
429 | if (sym->flags & SYMBOL_NEW) { | 429 | if (!(sym->flags & SYMBOL_DEF_USER)) { |
430 | sym->flags &= ~SYMBOL_NEW; | 430 | sym->flags |= SYMBOL_DEF_USER; |
431 | sym_set_changed(sym); | 431 | sym_set_changed(sym); |
432 | } | 432 | } |
433 | /* | 433 | /* |
@@ -440,11 +440,11 @@ bool sym_set_tristate_value(struct symbol *sym, tristate val) | |||
440 | struct expr *e; | 440 | struct expr *e; |
441 | 441 | ||
442 | cs->def[S_DEF_USER].val = sym; | 442 | cs->def[S_DEF_USER].val = sym; |
443 | cs->flags &= ~SYMBOL_NEW; | 443 | cs->flags |= SYMBOL_DEF_USER; |
444 | prop = sym_get_choice_prop(cs); | 444 | prop = sym_get_choice_prop(cs); |
445 | for (e = prop->expr; e; e = e->left.expr) { | 445 | for (e = prop->expr; e; e = e->left.expr) { |
446 | if (e->right.sym->visible != no) | 446 | if (e->right.sym->visible != no) |
447 | e->right.sym->flags &= ~SYMBOL_NEW; | 447 | e->right.sym->flags |= SYMBOL_DEF_USER; |
448 | } | 448 | } |
449 | } | 449 | } |
450 | 450 | ||
@@ -591,8 +591,8 @@ bool sym_set_string_value(struct symbol *sym, const char *newval) | |||
591 | if (!sym_string_within_range(sym, newval)) | 591 | if (!sym_string_within_range(sym, newval)) |
592 | return false; | 592 | return false; |
593 | 593 | ||
594 | if (sym->flags & SYMBOL_NEW) { | 594 | if (!(sym->flags & SYMBOL_DEF_USER)) { |
595 | sym->flags &= ~SYMBOL_NEW; | 595 | sym->flags |= SYMBOL_DEF_USER; |
596 | sym_set_changed(sym); | 596 | sym_set_changed(sym); |
597 | } | 597 | } |
598 | 598 | ||
@@ -679,7 +679,6 @@ struct symbol *sym_lookup(const char *name, int isconst) | |||
679 | memset(symbol, 0, sizeof(*symbol)); | 679 | memset(symbol, 0, sizeof(*symbol)); |
680 | symbol->name = new_name; | 680 | symbol->name = new_name; |
681 | symbol->type = S_UNKNOWN; | 681 | symbol->type = S_UNKNOWN; |
682 | symbol->flags = SYMBOL_NEW; | ||
683 | if (isconst) | 682 | if (isconst) |
684 | symbol->flags |= SYMBOL_CONST; | 683 | symbol->flags |= SYMBOL_CONST; |
685 | 684 | ||