To prepare for an upcoming patch that uses the location of the driver used when doing an env_import_redund, add env_driver as an argument of env_import_redund so that it can be used within.
Update all calls to this function and the prototype. Signed-off-by: Quentin Schulz <quentin.sch...@free-electrons.com> --- env/common.c | 2 +- env/nand.c | 2 +- env/ubi.c | 2 +- include/environment.h | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/env/common.c b/env/common.c index 75b8334..24cf41b 100644 --- a/env/common.c +++ b/env/common.c @@ -197,7 +197,7 @@ int env_import(const char *buf, int check) #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT static unsigned char env_flags; -int env_import_redund(const char *buf1, const char *buf2) +int env_import_redund(struct env_driver *drv, const char *buf1, const char *buf2) { int crc1_ok, crc2_ok; env_t *ep, *tmp_env1, *tmp_env2; diff --git a/env/nand.c b/env/nand.c index 6ed3c26..49e506e 100644 --- a/env/nand.c +++ b/env/nand.c @@ -352,7 +352,7 @@ static int env_nand_load(struct env_driver *drv) gd->env_valid = ENV_REDUND; env_import((char *)tmp_env2, 1); } else { - env_import_redund((char *)tmp_env1, (char *)tmp_env2); + env_import_redund(drv, (char *)tmp_env1, (char *)tmp_env2); } done: diff --git a/env/ubi.c b/env/ubi.c index a649999..51b61eb 100644 --- a/env/ubi.c +++ b/env/ubi.c @@ -130,7 +130,7 @@ static int env_ubi_load(struct env_driver *drv) CONFIG_ENV_UBI_PART, CONFIG_ENV_UBI_VOLUME_REDUND); } - env_import_redund((char *)tmp_env1, (char *)tmp_env2); + env_import_redund(drv, (char *)tmp_env1, (char *)tmp_env2); return 0; } diff --git a/include/environment.h b/include/environment.h index 34a0d5e..1e9254f 100644 --- a/include/environment.h +++ b/include/environment.h @@ -318,7 +318,8 @@ int env_export(env_t *env_out); #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT /* Select and import one of two redundant environments */ -int env_import_redund(const char *buf1, const char *buf2); +int env_import_redund(struct env_driver *drv, const char *buf1, + const char *buf2); #endif /** -- git-series 0.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot