With commit
82b2f4135719 ("env_internal.h: add alternative ENV_SAVE_PTR
macro") we introduced the ENV_SAVE_PTR macro but as explained in the
commit message, left full conversion for a later time. This commit
makes more progress on that front by doing the remaining easy
conversions to the new macro.
Signed-off-by: Tom Rini <trini@konsulko.com>
Changes in v2:
- Reduce the number of conversions, some didn't work as expected once
CMD_SAVEENV was actually disabled.
- Finish converting UBI
Cc Rasmus Villemoes <rasmus.villemoes@prevas.dk>
.location = ENVL_EEPROM,
ENV_NAME("EEPROM")
.load = env_eeprom_load,
- .save = env_save_ptr(env_eeprom_save),
+ .save = ENV_SAVE_PTR(env_eeprom_save),
};
.location = ENVL_NVRAM,
ENV_NAME("NVRAM")
.load = env_nvram_load,
- .save = env_save_ptr(env_nvram_save),
+ .save = ENV_SAVE_PTR(env_nvram_save),
.init = env_nvram_init,
};
.location = ENVL_ONENAND,
ENV_NAME("OneNAND")
.load = env_onenand_load,
- .save = env_save_ptr(env_onenand_save),
+ .save = ENV_SAVE_PTR(env_onenand_save),
};
.location = ENVL_SCSI,
ENV_NAME("SCSI")
.load = env_scsi_load,
-#if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_XPL_BUILD)
- .save = env_save_ptr(env_scsi_save),
+ .save = ENV_SAVE_PTR(env_scsi_save),
.erase = ENV_ERASE_PTR(env_scsi_erase),
-#endif
};
#define ENV_UBI_VOLUME_REDUND "invalid"
#endif
-#ifdef CONFIG_CMD_SAVEENV
#ifdef CONFIG_ENV_REDUNDANT
static int env_ubi_save(void)
{
return 0;
}
#endif /* CONFIG_ENV_REDUNDANT */
-#endif /* CONFIG_CMD_SAVEENV */
#ifdef CONFIG_ENV_REDUNDANT
static int env_ubi_load(void)
.location = ENVL_UBI,
ENV_NAME("UBI")
.load = env_ubi_load,
- .save = env_save_ptr(env_ubi_save),
+ .save = ENV_SAVE_PTR(env_ubi_save),
.erase = ENV_ERASE_PTR(env_ubi_erase),
};