提交 04bf3011 编写于 作者: M Mark Brown 提交者: Greg Kroah-Hartman

regulator: Support driver probe deferral

If we fail to locate a requested regulator return -EPROBE_DEFER. If drivers
pass this error code through to their caller (which they really should)
then this will ensure that the probe is retried later when further devices
become available.  In the unusual case where a driver doesn't want this
it can override the default behaviour.
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: NGrant Likely <grant.likely@secretlab.ca>
Acked-by: NLiam Girdwood <lrg@ti.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 263a5c8e
......@@ -1210,7 +1210,7 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
{
struct regulator_dev *rdev;
struct regulator_map *map;
struct regulator *regulator = ERR_PTR(-ENODEV);
struct regulator *regulator = ERR_PTR(-EPROBE_DEFER);
const char *devname = NULL;
int ret;
......@@ -2834,7 +2834,7 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
if (!r) {
dev_err(dev, "Failed to find supply %s\n", supply);
ret = -ENODEV;
ret = -EPROBE_DEFER;
goto scrub;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册