mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 03:15:00 +00:00
env/fat.c: remove private CMD_SAVEENV logic
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>
This commit is contained in:
parent
82b2f41357
commit
3908bc9344
1 changed files with 1 additions and 8 deletions
9
env/fat.c
vendored
9
env/fat.c
vendored
|
@ -26,12 +26,8 @@
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# define LOADENV
|
# define LOADENV
|
||||||
# if defined(CONFIG_CMD_SAVEENV)
|
|
||||||
# define CMD_SAVEENV
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CMD_SAVEENV
|
|
||||||
static int env_fat_save(void)
|
static int env_fat_save(void)
|
||||||
{
|
{
|
||||||
env_t __aligned(ARCH_DMA_MINALIGN) env_new;
|
env_t __aligned(ARCH_DMA_MINALIGN) env_new;
|
||||||
|
@ -76,7 +72,6 @@ static int env_fat_save(void)
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif /* CMD_SAVEENV */
|
|
||||||
|
|
||||||
#ifdef LOADENV
|
#ifdef LOADENV
|
||||||
static int env_fat_load(void)
|
static int env_fat_load(void)
|
||||||
|
@ -135,7 +130,5 @@ U_BOOT_ENV_LOCATION(fat) = {
|
||||||
#ifdef LOADENV
|
#ifdef LOADENV
|
||||||
.load = env_fat_load,
|
.load = env_fat_load,
|
||||||
#endif
|
#endif
|
||||||
#ifdef CMD_SAVEENV
|
.save = ENV_SAVE_PTR(env_fat_save),
|
||||||
.save = env_save_ptr(env_fat_save),
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue