Commit 76726472 authored by Rabin Vincent's avatar Rabin Vincent Committed by Ulf Hansson

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: default avatarRabin Vincent <rabin.vincent@axis.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent da795ec2
...@@ -1715,12 +1715,14 @@ static int usdhi6_probe(struct platform_device *pdev) ...@@ -1715,12 +1715,14 @@ static int usdhi6_probe(struct platform_device *pdev)
if (!mmc) if (!mmc)
return -ENOMEM; return -ENOMEM;
ret = mmc_regulator_get_supply(mmc);
if (ret == -EPROBE_DEFER)
goto e_free_mmc;
ret = mmc_of_parse(mmc); ret = mmc_of_parse(mmc);
if (ret < 0) if (ret < 0)
goto e_free_mmc; goto e_free_mmc;
mmc_regulator_get_supply(mmc);
host = mmc_priv(mmc); host = mmc_priv(mmc);
host->mmc = mmc; host->mmc = mmc;
host->wait = USDHI6_WAIT_FOR_REQUEST; host->wait = USDHI6_WAIT_FOR_REQUEST;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment