env: Drop common init() functions

Most of the init() implementations just use the default environment.
Adjust env_init_new() to do this automatically, and drop the redundant
code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Simon Glass
2017-08-03 12:22:02 -06:00
committed by Tom Rini
parent e5bce247b0
commit 7938822a6b
13 changed files with 12 additions and 128 deletions

10
env/fat.c vendored
View File

@@ -37,15 +37,6 @@ env_t *env_ptr;
DECLARE_GLOBAL_DATA_PTR;
static int env_fat_init(void)
{
/* use default */
gd->env_addr = (ulong)&default_environment[0];
gd->env_valid = ENV_VALID;
return 0;
}
#ifdef CMD_SAVEENV
static int env_fat_save(void)
{
@@ -131,5 +122,4 @@ U_BOOT_ENV_LOCATION(fat) = {
#ifdef CMD_SAVEENV
.save = env_save_ptr(env_fat_save),
#endif
.init = env_fat_init,
};