summaryrefslogtreecommitdiff
path: root/common/env_mmc.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-05-01 13:52:29 -0600
committerSimon Glass <sjg@chromium.org>2016-05-17 09:54:43 -0600
commit69f45cd53b8ad8bc3afef2cf2410baf58fe75a6f (patch)
treea0272956d8da3a10f70ed60da94becfdf6c92f8f /common/env_mmc.c
parent0776167ec5541a2b4fa099dfea5a1aad2d4b7c72 (diff)
dm: mmc: Use the new select_hwpart() API
Avoid calling directly into the MMC code - use the new API call instead. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/env_mmc.c')
-rw-r--r--common/env_mmc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/env_mmc.c b/common/env_mmc.c
index bdb452e58c..c7fef188cd 100644
--- a/common/env_mmc.c
+++ b/common/env_mmc.c
@@ -86,8 +86,8 @@ static int mmc_set_env_part(struct mmc *mmc)
dev = 0;
#endif
- env_mmc_orig_hwpart = mmc->block_dev.hwpart;
- ret = mmc_select_hwpart(dev, part);
+ env_mmc_orig_hwpart = mmc_get_blk_desc(mmc)->hwpart;
+ ret = blk_select_hwpart_devnum(IF_TYPE_MMC, dev, part);
if (ret)
puts("MMC partition switch failed\n");
@@ -119,7 +119,7 @@ static void fini_mmc_for_env(struct mmc *mmc)
#ifdef CONFIG_SPL_BUILD
dev = 0;
#endif
- mmc_select_hwpart(dev, env_mmc_orig_hwpart);
+ blk_select_hwpart_devnum(IF_TYPE_MMC, dev, env_mmc_orig_hwpart);
#endif
}