summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-27 17:37:19 (GMT)
committerJaehoon Chung <jh80.chung@samsung.com>2017-06-09 11:25:16 (GMT)
commit97525647227df6c00f63fc5ee41ad8d353ab6708 (patch)
treefa1837e5602677cef24213ef9bfd8fa688afa075 /drivers/mmc
parent01b73fe63078e5bb1d375dc7d66e6f67893d3305 (diff)
downloadu-boot-fsl-qoriq-97525647227df6c00f63fc5ee41ad8d353ab6708.tar.xz
dm: mmc: Avoid probing block devices in find_mmc_device()
We do not need to probe the block device here, so avoid doing so. The MMC device itself must be active, but the block device can come later. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/mmc-uclass.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index 4dc3925..994d268 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -97,7 +97,7 @@ struct mmc *find_mmc_device(int dev_num)
struct udevice *dev, *mmc_dev;
int ret;
- ret = blk_get_device(IF_TYPE_MMC, dev_num, &dev);
+ ret = blk_find_device(IF_TYPE_MMC, dev_num, &dev);
if (ret) {
#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
@@ -108,7 +108,9 @@ struct mmc *find_mmc_device(int dev_num)
mmc_dev = dev_get_parent(dev);
- return mmc_get_mmc_dev(mmc_dev);
+ struct mmc *mmc = mmc_get_mmc_dev(mmc_dev);
+
+ return mmc;
}
int get_mmc_num(void)