summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/usdhi6rol0.c
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@axis.com>2015-08-19 15:41:34 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2015-08-27 14:50:54 +0200
commit767264725d6c0c8e2a42f14ded88c8f05fec5863 (patch)
treede99f644681ea43382678c06109917390a5a2e38 /drivers/mmc/host/usdhi6rol0.c
parentda795ec26e2542f1e306598a1d7a31c0762f2bd7 (diff)
downloadlinux-767264725d6c0c8e2a42f14ded88c8f05fec5863.tar.bz2
mmc: usdhi6rol0: handle probe deferral for regulator
We ignore errors from mmc_regulator_get_supply() because the usage of the regulators is optional for the driver, but we still need to check for and handle EPROBE_DEFER, like it's done in for example dw_mmc. Otherwise we might end up not using the specified regulators just because of probe order. Signed-off-by: Rabin Vincent <rabin.vincent@axis.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/usdhi6rol0.c')
-rw-r--r--drivers/mmc/host/usdhi6rol0.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c
index 54b082b1804a..63d5d722b01f 100644
--- a/drivers/mmc/host/usdhi6rol0.c
+++ b/drivers/mmc/host/usdhi6rol0.c
@@ -1715,12 +1715,14 @@ static int usdhi6_probe(struct platform_device *pdev)
if (!mmc)
return -ENOMEM;
+ ret = mmc_regulator_get_supply(mmc);
+ if (ret == -EPROBE_DEFER)
+ goto e_free_mmc;
+
ret = mmc_of_parse(mmc);
if (ret < 0)
goto e_free_mmc;
- mmc_regulator_get_supply(mmc);
-
host = mmc_priv(mmc);
host->mmc = mmc;
host->wait = USDHI6_WAIT_FOR_REQUEST;