drivers: clk: Fix using assigned-clocks in the node of the clock it sets up
[oweals/u-boot.git] / env / sf.c
index 5531293e05697c8a6d29e45826641a10830f1bc9..590d0cedd852999eec5ea485a92b265d0066401f 100644 (file)
--- a/env/sf.c
+++ b/env/sf.c
@@ -11,7 +11,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
-#include <environment.h>
+#include <env_internal.h>
 #include <malloc.h>
 #include <spi.h>
 #include <spi_flash.h>
@@ -30,8 +30,6 @@ static ulong env_offset               = CONFIG_ENV_OFFSET;
 static ulong env_new_offset    = CONFIG_ENV_OFFSET_REDUND;
 #endif
 
-#define ACTIVE_FLAG    1
-#define OBSOLETE_FLAG  0
 #endif /* CONFIG_ENV_OFFSET_REDUND */
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -74,7 +72,7 @@ static int setup_flash_device(void)
 static int env_sf_save(void)
 {
        env_t   env_new;
-       char    *saved_buffer = NULL, flag = OBSOLETE_FLAG;
+       char    *saved_buffer = NULL, flag = ENV_REDUND_OBSOLETE;
        u32     saved_size, saved_offset, sector;
        int     ret;
 
@@ -85,7 +83,7 @@ static int env_sf_save(void)
        ret = env_export(&env_new);
        if (ret)
                return -EIO;
-       env_new.flags   = ACTIVE_FLAG;
+       env_new.flags   = ENV_REDUND_ACTIVE;
 
        if (gd->env_valid == ENV_VALID) {
                env_new_offset = CONFIG_ENV_OFFSET_REDUND;