diff options
author | Pali Rohár | 2022-04-03 00:24:25 +0200 |
---|---|---|
committer | Priyanka Jain | 2022-04-26 17:18:39 +0530 |
commit | d64a8fd0a9021ef0a87e6f3e315c8d65a8dd7bd0 (patch) | |
tree | 1ac860cb4bb55ea009190b69d4b46abaf7a742e9 /common/hwconfig.c | |
parent | 48467e47698a27a2a32961bf8bdf19b0e236704c (diff) |
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>
Diffstat (limited to 'common/hwconfig.c')
-rw-r--r-- | common/hwconfig.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/hwconfig.c b/common/hwconfig.c index 63b3ccaf84e..43566b81bd4 100644 --- a/common/hwconfig.c +++ b/common/hwconfig.c @@ -83,7 +83,9 @@ static const char *__hwconfig(const char *opt, size_t *arglen, "and before environment is ready\n"); return NULL; } +#if CONFIG_IS_ENABLED(ENV_SUPPORT) env_hwconfig = env_get("hwconfig"); +#endif } if (env_hwconfig) { |