mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
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: Alexander Stein <alexander.stein@ew.tq-group.com> Link: https://lore.kernel.org/r/20240911090910.3060749-1-alexander.stein@ew.tq-group.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
73048a8325
commit
cd3689b677
@ -255,7 +255,9 @@ int mmc_regulator_get_supply(struct mmc_host *mmc)
|
||||
|
||||
if (IS_ERR(mmc->supply.vmmc)) {
|
||||
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");
|
||||
} else {
|
||||
ret = mmc_regulator_get_ocrmask(mmc->supply.vmmc);
|
||||
@ -267,7 +269,9 @@ int mmc_regulator_get_supply(struct mmc_host *mmc)
|
||||
|
||||
if (IS_ERR(mmc->supply.vqmmc)) {
|
||||
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");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user