提交 ee06a3ef 编写于 作者: J Jurica Vukadin 提交者: Masahiro Yamada

kconfig: Update config changed flag before calling callback

Prior to commit 5ee54659 ("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: 5ee54659 ("kconfig: change sym_change_count to a boolean flag")
Signed-off-by: NJurica Vukadin <jura@vukad.in>
Acked-by: NRandy Dunlap <rdunlap@infradead.org>
Tested-by: NRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
上级 ced0f245
...@@ -1226,10 +1226,12 @@ static void (*conf_changed_callback)(void); ...@@ -1226,10 +1226,12 @@ static void (*conf_changed_callback)(void);
void conf_set_changed(bool val) void conf_set_changed(bool val)
{ {
if (conf_changed_callback && conf_changed != val) bool changed = conf_changed != val;
conf_changed_callback();
conf_changed = val; conf_changed = val;
if (conf_changed_callback && changed)
conf_changed_callback();
} }
bool conf_get_changed(void) bool conf_get_changed(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册