@@ -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;
@@ -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:
@@ -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;
}
@@ -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
/**
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.schulz@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(-)