pinctrl: Kconfig: remove duplicated nodes
[oweals/u-boot.git] / env / sata.c
index 59aedf4d76644964a3b48aa31d5b47308de44df2..93697100815d080ae6c1e0bd81669dfa666314e0 100644 (file)
@@ -8,7 +8,8 @@
 #include <common.h>
 
 #include <command.h>
-#include <environment.h>
+#include <env.h>
+#include <env_internal.h>
 #include <linux/stddef.h>
 #include <errno.h>
 #include <memalign.h>
@@ -65,7 +66,7 @@ static int env_sata_save(void)
                return 1;
 
        printf("Writing to SATA(%d)...", env_sata);
-       if (write_env(sata, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, &env_new)) {
+       if (write_env(sata, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, (u_char *)env_new)) {
                puts("failed\n");
                return 1;
        }
@@ -106,7 +107,7 @@ static void env_sata_load(void)
        }
 
        if (read_env(sata, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, buf)) {
-               set_default_env(NULL, 0);
+               env_set_default(NULL, 0);
                return -EIO;
        }