test: Remove duplicate macro
[pandora-u-boot.git] / env / mmc.c
index ee376c3..09e94f0 100644 (file)
--- a/env/mmc.c
+++ b/env/mmc.c
@@ -6,6 +6,7 @@
 /* #define DEBUG */
 
 #include <common.h>
+#include <asm/global_data.h>
 
 #include <command.h>
 #include <env.h>
@@ -232,7 +233,6 @@ fini:
        return ret;
 }
 
-#if defined(CONFIG_CMD_ERASEENV)
 static inline int erase_env(struct mmc *mmc, unsigned long size,
                            unsigned long offset)
 {
@@ -278,7 +278,6 @@ static int env_mmc_erase(void)
 
        return ret;
 }
-#endif /* CONFIG_CMD_ERASEENV */
 #endif /* CONFIG_CMD_SAVEENV && !CONFIG_SPL_BUILD */
 
 static inline int read_env(struct mmc *mmc, unsigned long size,
@@ -393,8 +392,6 @@ U_BOOT_ENV_LOCATION(mmc) = {
        .load           = env_mmc_load,
 #ifndef CONFIG_SPL_BUILD
        .save           = env_save_ptr(env_mmc_save),
-#if defined(CONFIG_CMD_ERASEENV)
-       .erase          = env_mmc_erase,
-#endif
+       .erase          = ENV_ERASE_PTR(env_mmc_erase)
 #endif
 };