From 46683f3da191a4c2156d5473c23b9923c461912c Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Fri, 22 Jul 2016 17:22:50 +0800 Subject: mmc-uclass: correct the device number Not like the mmc-legacy which the devnum starts from 1, it starts from 0 in mmc-uclass, so the device number should be (devnum + 1) in get_mmc_num(). Signed-off-by: Kever Yang Acked-by: Simon Glass Reviewed-by: Jaehoon Chung --- include/mmc.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/mmc.h') diff --git a/include/mmc.h b/include/mmc.h index 8f309f1f71c..dd47f34e9de 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -503,6 +503,12 @@ void mmc_set_clock(struct mmc *mmc, uint clock); struct mmc *find_mmc_device(int dev_num); int mmc_set_dev(int dev_num); void print_mmc_devices(char separator); + +/** + * get_mmc_num() - get the total MMC device number + * + * @return 0 if there is no MMC device, else the number of devices + */ int get_mmc_num(void); int mmc_hwpart_config(struct mmc *mmc, const struct mmc_hwpart_conf *conf, enum mmc_hwpart_conf_mode mode); -- cgit v1.2.3