aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer.lkml@gmail.com>2010-07-27 15:57:43 -0400
committerMichal Marek <mmarek@suse.cz>2010-07-29 10:56:02 -0400
commitac1ffde1ba053db0266f886a15ed845a6628fcb0 (patch)
treef5366e5c65c523c60a73b40a568bca3359a9dc69 /scripts/kconfig
parent1244b41d00eb60cb3d05220383bc9d15b9045fb4 (diff)
kconfig: fix MODULES-related bug in case of no .config
There seems to be a kconfig bug due to MODULES not always being evaluated if no .config is found. Take the following Kconfig as an example: config MODULES def_bool y config FOO def_tristate m With no .config, the following configuration is generated: CONFIG_MODULES=y CONFIG_FOO=y With an empty .config, the following: CONFIG_MODULES=y CONFIG_FOO=m Tristate choice statements can also exhibit the problem, due to having an implicit rev_dep (select) containing "m". The problem is that MODULES is never evaluted in conf_read_simple() unless there's a .config. The following patch fixes this. Signed-off-by: Ulf Magnusson <ulfalizer.lkml@gmail.com> Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/confdata.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 210a49e27d47..8dce5862550d 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -170,8 +170,11 @@ int conf_read_simple(const char *name, int def)
170 if (in) 170 if (in)
171 goto load; 171 goto load;
172 sym_add_change_count(1); 172 sym_add_change_count(1);
173 if (!sym_defconfig_list) 173 if (!sym_defconfig_list) {
174 if (modules_sym)
175 sym_calc_value(modules_sym);
174 return 1; 176 return 1;
177 }
175 178
176 for_all_defaults(sym_defconfig_list, prop) { 179 for_all_defaults(sym_defconfig_list, prop) {
177 if (expr_calc_value(prop->visible.expr) == no || 180 if (expr_calc_value(prop->visible.expr) == no ||