Always compile the env_fat_save() function, and let
CONFIG_IS_ENABLED(SAVEENV) (via the ENV_SAVE_PTR macro) decide whether
it actually ends up being compiled in.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
# endif
#else
# define LOADENV
-# if defined(CONFIG_CMD_SAVEENV)
-# define CMD_SAVEENV
-# endif
#endif
-#ifdef CMD_SAVEENV
static int env_fat_save(void)
{
env_t __aligned(ARCH_DMA_MINALIGN) env_new;
return 0;
}
-#endif /* CMD_SAVEENV */
#ifdef LOADENV
static int env_fat_load(void)
#ifdef LOADENV
.load = env_fat_load,
#endif
-#ifdef CMD_SAVEENV
- .save = env_save_ptr(env_fat_save),
-#endif
+ .save = ENV_SAVE_PTR(env_fat_save),
};