summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-01-16 18:16:48 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-01-18 09:43:10 +0100
commit9e8ceaa032e6f1767d113b5f0264bf715f07c648 (patch)
tree3d2522d8d67cc8d3f2b9ab24f3f8a123661a2650 /drivers
parentadb18ca987c9b5f1e99aac30e000300595c45d6e (diff)
downloadbarebox-9e8ceaa032e6f1767d113b5f0264bf715f07c648.tar.gz
barebox-9e8ceaa032e6f1767d113b5f0264bf715f07c648.tar.xz
regulator: Assume probe deferral instead of missing regulator
Don't report requested regulator (via of_regulator_get()) as non-existent if said regulator is missing from regulator list. Instead report it as probe deferral to give other, unprobed, drivers a chance to resolve this. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/regulator/core.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 795dcdb8c1..4ca035ae94 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -227,7 +227,12 @@ static struct regulator_internal *of_regulator_get(struct device_d *dev, const c
}
}
- ri = ERR_PTR(-ENODEV);
+ /*
+ * It is possible that regulator we are looking for will be
+ * added in future initcalls, so, instead of reporting a
+ * complete failure report probe deferral
+ */
+ ri = ERR_PTR(-EPROBE_DEFER);
out:
free(propname);