From: Peter Bigot Date: Wed, 3 Sep 2014 17:22:43 +0000 (-0500) Subject: env_mmc: correct fini partition to match init partition X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=19345d7c9483b84578da5206b3c604b534121d88;p=u-boot.git env_mmc: correct fini partition to match init partition The code to set the MMC partition uses an weak function to obtain the correct partition number. Use that instead of the compile-time default when deciding whether it needs to switch back. Fixes: 6e7b7df4df43574 ("env_mmc: support env partition setup in runtime") Signed-off-by: Peter A. Bigot Acked-by: Dmitry Lifshitz Acked-by: Pantelis Antoniou --- diff --git a/common/env_mmc.c b/common/env_mmc.c index a7621a897c..14648e37bd 100644 --- a/common/env_mmc.c +++ b/common/env_mmc.c @@ -113,7 +113,7 @@ static void fini_mmc_for_env(struct mmc *mmc) #ifdef CONFIG_SPL_BUILD dev = 0; #endif - if (CONFIG_SYS_MMC_ENV_PART != mmc->part_num) + if (mmc_get_env_part(mmc) != mmc->part_num) mmc_switch_part(dev, mmc->part_num); #endif }