summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2026-03-20 14:53:39 -0600
committerTom Rini <[email protected]>2026-04-03 13:42:49 -0600
commitc1e17ac28466f9ba68cb65daa9d7f8b4b3ae0a25 (patch)
tree98c13db85ea112b4d1a4534a9585a7bf3a962c99
parent0a0c3a400180a9d17d50bb9b29921b5c898104c2 (diff)
env: Make use of IF_ENABLED_INT in spi flash support
In order to build the spi flash environment driver, but with CONFIG_ENV_REDUNDANT disabled we must make use of IF_ENABLED_INT to check for a value in CONFIG_ENV_OFFSET_REDUND otherwise we will fail to build. Signed-off-by: Tom Rini <[email protected]>
-rw-r--r--env/sf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/env/sf.c b/env/sf.c
index 0e27a020643..14c35324e64 100644
--- a/env/sf.c
+++ b/env/sf.c
@@ -396,7 +396,8 @@ static int env_sf_init_early(void)
if (IS_ENABLED(CONFIG_ENV_REDUNDANT)) {
read2_fail = spi_flash_read(env_flash,
- CONFIG_ENV_OFFSET_REDUND,
+ IF_ENABLED_INT(CONFIG_ENV_REDUNDANT,
+ CONFIG_ENV_OFFSET_REDUND),
CONFIG_ENV_SIZE, tmp_env2);
ret = env_check_redund((char *)tmp_env1, read1_fail,
(char *)tmp_env2, read2_fail);