Skip to content

Commit cd3689b

Browse files
tq-steinastorulf
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 73048a8 commit cd3689b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/mmc/core/regulator.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,9 @@ int mmc_regulator_get_supply(struct mmc_host *mmc)
255255

256256
if (IS_ERR(mmc->supply.vmmc)) {
257257
if (PTR_ERR(mmc->supply.vmmc) == -EPROBE_DEFER)
258-
return -EPROBE_DEFER;
258+
return dev_err_probe(dev, -EPROBE_DEFER,
259+
"vmmc regulator not available\n");
260+
259261
dev_dbg(dev, "No vmmc regulator found\n");
260262
} else {
261263
ret = mmc_regulator_get_ocrmask(mmc->supply.vmmc);
@@ -267,7 +269,9 @@ int mmc_regulator_get_supply(struct mmc_host *mmc)
267269

268270
if (IS_ERR(mmc->supply.vqmmc)) {
269271
if (PTR_ERR(mmc->supply.vqmmc) == -EPROBE_DEFER)
270-
return -EPROBE_DEFER;
272+
return dev_err_probe(dev, -EPROBE_DEFER,
273+
"vqmmc regulator not available\n");
274+
271275
dev_dbg(dev, "No vqmmc regulator found\n");
272276
}
273277

0 commit comments

Comments
 (0)