board: stm32mp1: solve compilation issue when ENV_IS_IN_MMC is deactivated
Solve compilation issue on undefined CONFIG_SYS_MMC_ENV_DEV when
CONFIG_ENV_IS_IN_MMC is deactivated on STMicroelectronics boards
defconfig
Fixes: 9f97193616 ("board: stm32mp1: use CONFIG_SYS_MMC_ENV_DEV when available")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
This commit is contained in:
committed by
Patrice Chotard
parent
6ddc71c13e
commit
046bdb8064
@@ -890,8 +890,10 @@ const char *env_ext4_get_dev_part(void)
|
|||||||
|
|
||||||
int mmc_get_env_dev(void)
|
int mmc_get_env_dev(void)
|
||||||
{
|
{
|
||||||
if (CONFIG_SYS_MMC_ENV_DEV >= 0)
|
const int mmc_env_dev = CONFIG_IS_ENABLED(ENV_IS_IN_MMC, (CONFIG_SYS_MMC_ENV_DEV), (-1));
|
||||||
return CONFIG_SYS_MMC_ENV_DEV;
|
|
||||||
|
if (mmc_env_dev >= 0)
|
||||||
|
return mmc_env_dev;
|
||||||
|
|
||||||
/* use boot instance to select the correct mmc device identifier */
|
/* use boot instance to select the correct mmc device identifier */
|
||||||
return mmc_get_boot();
|
return mmc_get_boot();
|
||||||
|
|||||||
Reference in New Issue
Block a user