Revert "env: solve compilation error in SPL"
authorTom Rini <trini@konsulko.com>
Fri, 4 Oct 2019 16:21:33 +0000 (12:21 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 4 Oct 2019 16:21:33 +0000 (12:21 -0400)
This reverts commit 7d4776545b0f8a8827e5d061206faf61c9ba6ea9.  The
changes here break environment validation and furthermore do not seem to
be required.

Signed-off-by: Tom Rini <trini@konsulko.com>
env/common.c

index 3fb60509dd8514c311b7a781b35463c2cf21264f..4daaa6faea60373a437677b25afe126e7f75aa98 100644 (file)
@@ -24,10 +24,7 @@ DECLARE_GLOBAL_DATA_PTR;
 #include <env_default.h>
 
 struct hsearch_data env_htab = {
 #include <env_default.h>
 
 struct hsearch_data env_htab = {
-#if CONFIG_IS_ENABLED(ENV_SUPPORT)
-       /* defined in flags.c, only compile with ENV_SUPPORT */
        .change_ok = env_flags_validate,
        .change_ok = env_flags_validate,
-#endif
 };
 
 /*
 };
 
 /*
@@ -229,9 +226,7 @@ void env_relocate(void)
 #if defined(CONFIG_NEEDS_MANUAL_RELOC)
        env_reloc();
        env_fix_drivers();
 #if defined(CONFIG_NEEDS_MANUAL_RELOC)
        env_reloc();
        env_fix_drivers();
-
-       if (env_htab.change_ok)
-               env_htab.change_ok += gd->reloc_off;
+       env_htab.change_ok += gd->reloc_off;
 #endif
        if (gd->env_valid == ENV_INVALID) {
 #if defined(CONFIG_ENV_IS_NOWHERE) || defined(CONFIG_SPL_BUILD)
 #endif
        if (gd->env_valid == ENV_INVALID) {
 #if defined(CONFIG_ENV_IS_NOWHERE) || defined(CONFIG_SPL_BUILD)