summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJurica Vukadin <jura@vukad.in>2023-03-07 20:40:39 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-22 13:31:29 +0100
commitc80b2acdb049066d37e6bfc4f9350a09cc011300 (patch)
tree793d6dd40bf7659c0679e0d73a8c57f71ad10e55 /scripts
parent52f64c5fc0d66beef1b1fe76b83f18dea16453c5 (diff)
kconfig: Update config changed flag before calling callback
[ Upstream commit ee06a3ef7e3cddb62b90ac40aa661d3c12f7cabc ] Prior to commit 5ee546594025 ("kconfig: change sym_change_count to a boolean flag"), the conf_updated flag was set to the new value *before* calling the callback. xconfig's save action depends on this behaviour, because xconfig calls conf_get_changed() directly from the callback and now sees the old value, thus never enabling the save button or the shortcut. Restore the previous behaviour. Fixes: 5ee546594025 ("kconfig: change sym_change_count to a boolean flag") Signed-off-by: Jurica Vukadin <jura@vukad.in> Acked-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/confdata.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 4a828bca071e..797c8bad3837 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -1124,10 +1124,12 @@ static void (*conf_changed_callback)(void);
void conf_set_changed(bool val)
{
- if (conf_changed_callback && conf_changed != val)
- conf_changed_callback();
+ bool changed = conf_changed != val;
conf_changed = val;
+
+ if (conf_changed_callback && changed)
+ conf_changed_callback();
}
bool conf_get_changed(void)