summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-02-04 12:58:17 +0000
committerMark Brown <broonie@linaro.org>2014-02-04 12:58:17 +0000
commit00e674702438b8b2abc9dd6b8b49d54a3e99baa7 (patch)
tree8383b6b671a0cc2a67c7320e7126623cbcb20a21 /drivers/regulator
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
parent317b5684d52269b75b4ec6480f9dac056d0d4ba8 (diff)
downloadop-kernel-dev-00e674702438b8b2abc9dd6b8b49d54a3e99baa7.zip
op-kernel-dev-00e674702438b8b2abc9dd6b8b49d54a3e99baa7.tar.gz
Merge remote-tracking branch 'regulator/fix/core' into regulator-linus
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index b38a6b6..16a309e 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1272,6 +1272,8 @@ static struct regulator_dev *regulator_dev_lookup(struct device *dev,
if (r->dev.parent &&
node == r->dev.of_node)
return r;
+ *ret = -EPROBE_DEFER;
+ return NULL;
} else {
/*
* If we couldn't even get the node then it's
@@ -1312,7 +1314,7 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
struct regulator_dev *rdev;
struct regulator *regulator = ERR_PTR(-EPROBE_DEFER);
const char *devname = NULL;
- int ret = -EPROBE_DEFER;
+ int ret;
if (id == NULL) {
pr_err("get() with no identifier\n");
@@ -1322,6 +1324,11 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
if (dev)
devname = dev_name(dev);
+ if (have_full_constraints())
+ ret = -ENODEV;
+ else
+ ret = -EPROBE_DEFER;
+
mutex_lock(&regulator_list_mutex);
rdev = regulator_dev_lookup(dev, id, &ret);
OpenPOWER on IntegriCloud