From: Mark Brown <[email protected]> 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.
Signed-off-by: Mark Brown <[email protected]> [[email protected]: changed error value from EAGAIN to EPROBE_DEFER] Signed-off-by: G, Manjunath Kondaiah <[email protected]> Acked-by: Grant Likely <[email protected]> Acked-by: Liam Girdwood <[email protected]> --- Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Grant Likely <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Dilan Lee <[email protected]> Cc: Mark Brown <[email protected]> Cc: Manjunath GKondaiah <[email protected]> Cc: Arnd Bergmann <[email protected]> drivers/regulator/core.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index d8e6a42..95dfd21 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1153,7 +1153,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; @@ -2668,7 +2668,7 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, if (!found) { dev_err(dev, "Failed to find supply %s\n", init_data->supply_regulator); - ret = -ENODEV; + ret = -EPROBE_DEFER; goto scrub; } -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
