diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-03 18:22:02 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-08-16 00:50:27 (GMT) |
commit | 7938822a6b75b69fff9793b6b1769dddf1249525 (patch) | |
tree | 10eacede3b5e5e51bac424bd54036dedb97c4d8f /env/dataflash.c | |
parent | e5bce247b01ae057f05cc80178f0df28ec1d27a7 (diff) | |
download | u-boot-7938822a6b75b69fff9793b6b1769dddf1249525.tar.xz |
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>
Diffstat (limited to 'env/dataflash.c')
-rw-r--r-- | env/dataflash.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/env/dataflash.c b/env/dataflash.c index 6d95d64..8ab482b 100644 --- a/env/dataflash.c +++ b/env/dataflash.c @@ -68,25 +68,9 @@ static int env_dataflash_save(void) CONFIG_ENV_SIZE); } -/* - * Initialize environment use - * - * We are still running from ROM, so data use is limited. - * Use a (moderately small) buffer on the stack - */ -int env_dataflash_init(void) -{ - /* use default */ - gd->env_addr = (ulong)&default_environment[0]; - gd->env_valid = ENV_VALID; - - return 0; -} - U_BOOT_ENV_LOCATION(dataflash) = { .location = ENVL_DATAFLASH, .get_char = env_dataflash_get_char, .load = env_dataflash_load, .save = env_save_ptr(env_dataflash_save), - .init = env_dataflash_init, }; |