Skip to content

Commit 7672647

Browse files
vwaxstorulf
authored andcommitted
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>
1 parent da795ec commit 7672647

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/mmc/host/usdhi6rol0.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,12 +1715,14 @@ static int usdhi6_probe(struct platform_device *pdev)
17151715
if (!mmc)
17161716
return -ENOMEM;
17171717

1718+
ret = mmc_regulator_get_supply(mmc);
1719+
if (ret == -EPROBE_DEFER)
1720+
goto e_free_mmc;
1721+
17181722
ret = mmc_of_parse(mmc);
17191723
if (ret < 0)
17201724
goto e_free_mmc;
17211725

1722-
mmc_regulator_get_supply(mmc);
1723-
17241726
host = mmc_priv(mmc);
17251727
host->mmc = mmc;
17261728
host->wait = USDHI6_WAIT_FOR_REQUEST;

0 commit comments

Comments
 (0)