Commit cd3689b6 authored by Alexander Stein's avatar Alexander Stein Committed by Ulf Hansson

mmc: core: Use dev_err_probe for deferred regulators

In case vmmc or vqmmc regulator is not available yet, use dev_err_probe
in order to set a deferred probe reason. This is a helpful hint in
/sys/kernel/debug/devices_deferred
Signed-off-by: default avatarAlexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20240911090910.3060749-1-alexander.stein@ew.tq-group.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 73048a83
...@@ -255,7 +255,9 @@ int mmc_regulator_get_supply(struct mmc_host *mmc) ...@@ -255,7 +255,9 @@ int mmc_regulator_get_supply(struct mmc_host *mmc)
if (IS_ERR(mmc->supply.vmmc)) { if (IS_ERR(mmc->supply.vmmc)) {
if (PTR_ERR(mmc->supply.vmmc) == -EPROBE_DEFER) if (PTR_ERR(mmc->supply.vmmc) == -EPROBE_DEFER)
return -EPROBE_DEFER; return dev_err_probe(dev, -EPROBE_DEFER,
"vmmc regulator not available\n");
dev_dbg(dev, "No vmmc regulator found\n"); dev_dbg(dev, "No vmmc regulator found\n");
} else { } else {
ret = mmc_regulator_get_ocrmask(mmc->supply.vmmc); ret = mmc_regulator_get_ocrmask(mmc->supply.vmmc);
...@@ -267,7 +269,9 @@ int mmc_regulator_get_supply(struct mmc_host *mmc) ...@@ -267,7 +269,9 @@ int mmc_regulator_get_supply(struct mmc_host *mmc)
if (IS_ERR(mmc->supply.vqmmc)) { if (IS_ERR(mmc->supply.vqmmc)) {
if (PTR_ERR(mmc->supply.vqmmc) == -EPROBE_DEFER) if (PTR_ERR(mmc->supply.vqmmc) == -EPROBE_DEFER)
return -EPROBE_DEFER; return dev_err_probe(dev, -EPROBE_DEFER,
"vqmmc regulator not available\n");
dev_dbg(dev, "No vqmmc regulator found\n"); dev_dbg(dev, "No vqmmc regulator found\n");
} }
......
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