hwconfig: Allow to compile it without env support

When env support is disabled then usage of env_get() generates linker
errors. So do not compile env_get() when env support is disabled (for
example when disabled only in SPL).

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
This commit is contained in:
Pali Rohár 2022-04-03 00:24:25 +02:00 committed by Priyanka Jain
parent 48467e4769
commit d64a8fd0a9

View File

@ -83,7 +83,9 @@ static const char *__hwconfig(const char *opt, size_t *arglen,
"and before environment is ready\n"); "and before environment is ready\n");
return NULL; return NULL;
} }
#if CONFIG_IS_ENABLED(ENV_SUPPORT)
env_hwconfig = env_get("hwconfig"); env_hwconfig = env_get("hwconfig");
#endif
} }
if (env_hwconfig) { if (env_hwconfig) {