Since function mmc_get_env_devno is __weak and can be overridden by
board code, boards do not necessarily need to define
CONFIG_SYS_MMC_ENV_DEV. If the constant is not defined, return 0 by
default.

Signed-off-by: Hector Palacios <hector.palac...@digi.com>
---
 common/env_mmc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/common/env_mmc.c b/common/env_mmc.c
index d569b070e005..bd3bc1d50b15 100644
--- a/common/env_mmc.c
+++ b/common/env_mmc.c
@@ -63,7 +63,11 @@ __weak int mmc_get_env_addr(struct mmc *mmc, int copy, u32 
*env_addr)
 
 __weak int mmc_get_env_devno(void)
 {
+#ifdef CONFIG_SYS_MMC_ENV_DEV
        return CONFIG_SYS_MMC_ENV_DEV;
+#endif
+       return 0;
+}
 
 __weak int mmc_get_env_partno(void)
 {
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to