Merge tag 'pull-12apr19' of git://git.denx.de/u-boot-dm
[oweals/u-boot.git] / env / ext4.c
index a2d32b9c8dea0473283d01c98013153b11af5f15..388474a11c750070e444609e2676878db71aa4bd 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (c) Copyright 2016 by VRT Technology
  *
@@ -15,8 +16,6 @@
  * EXT4 filesystem implementation in Uboot by
  * Uma Shankar <uma.shankar@samsung.com>
  * Manjunatha C Achar <a.manjunatha@samsung.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -31,8 +30,6 @@
 #include <ext4fs.h>
 #include <mmc.h>
 
-DECLARE_GLOBAL_DATA_PTR;
-
 #ifdef CONFIG_CMD_SAVEENV
 static int env_ext4_save(void)
 {
@@ -63,7 +60,7 @@ static int env_ext4_save(void)
        }
 
        err = ext4fs_write(CONFIG_ENV_EXT4_FILE, (void *)&env_new,
-                          sizeof(env_t));
+                          sizeof(env_t), FILETYPE_REG);
        ext4fs_close();
 
        if (err == -1) {
@@ -122,7 +119,7 @@ static int env_ext4_load(void)
        return env_import(buf, 1);
 
 err_env_relocate:
-       set_default_env(NULL);
+       set_default_env(NULL, 0);
 
        return -EIO;
 }