[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1317962127-29003-4-git-send-email-manjugk@ti.com>
Date: Fri, 07 Oct 2011 10:05:25 +0500
From: "G, Manjunath Kondaiah" <manjugk@...com>
To: linux-arm-kernel@...ts.infradead.org
CC: Mark Brown <broonie@...nsource.wolfsonmicro.com>,
linux-omap@...r.kernel.org, linux-mmc@...r.kernel.org,
linux-kernel@...r.kernel.org,
Grant Likely <grant.likely@...retlab.ca>,
Greg Kroah-Hartman <greg@...ah.com>,
Dilan Lee <dilee@...dia.com>,
Manjunath GKondaiah <manjunath.gkondaiah@...aro.org>,
Arnd Bergmann <arnd@...db.de>
Subject: [PATCH 3/5] regulator: Support driver probe deferral
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
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 <broonie@...nsource.wolfsonmicro.com>
[manjugk@...com: changed error value from EAGAIN to EPROBE_DEFER]
Signed-off-by: G, Manjunath Kondaiah <manjugk@...com>
Acked-by: Grant Likely <grant.likely@...retlab.ca>
Acked-by: Liam Girdwood <lrg@...com>
---
Cc: linux-omap@...r.kernel.org
Cc: linux-mmc@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Cc: Grant Likely <grant.likely@...retlab.ca>
Cc: Greg Kroah-Hartman <greg@...ah.com>
Cc: Dilan Lee <dilee@...dia.com>
Cc: Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc: Manjunath GKondaiah <manjunath.gkondaiah@...aro.org>
Cc: Arnd Bergmann <arnd@...db.de>
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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists