aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-02-04 07:58:17 -0500
committerMark Brown <broonie@linaro.org>2014-02-04 07:58:17 -0500
commit00e674702438b8b2abc9dd6b8b49d54a3e99baa7 (patch)
tree8383b6b671a0cc2a67c7320e7126623cbcb20a21 /drivers/regulator
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
parent317b5684d52269b75b4ec6480f9dac056d0d4ba8 (diff)
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 b38a6b669e8c..16a309e5c024 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,
1272 if (r->dev.parent && 1272 if (r->dev.parent &&
1273 node == r->dev.of_node) 1273 node == r->dev.of_node)
1274 return r; 1274 return r;
1275 *ret = -EPROBE_DEFER;
1276 return NULL;
1275 } else { 1277 } else {
1276 /* 1278 /*
1277 * If we couldn't even get the node then it's 1279 * 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,
1312 struct regulator_dev *rdev; 1314 struct regulator_dev *rdev;
1313 struct regulator *regulator = ERR_PTR(-EPROBE_DEFER); 1315 struct regulator *regulator = ERR_PTR(-EPROBE_DEFER);
1314 const char *devname = NULL; 1316 const char *devname = NULL;
1315 int ret = -EPROBE_DEFER; 1317 int ret;
1316 1318
1317 if (id == NULL) { 1319 if (id == NULL) {
1318 pr_err("get() with no identifier\n"); 1320 pr_err("get() with no identifier\n");
@@ -1322,6 +1324,11 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
1322 if (dev) 1324 if (dev)
1323 devname = dev_name(dev); 1325 devname = dev_name(dev);
1324 1326
1327 if (have_full_constraints())
1328 ret = -ENODEV;
1329 else
1330 ret = -EPROBE_DEFER;
1331
1325 mutex_lock(&regulator_list_mutex); 1332 mutex_lock(&regulator_list_mutex);
1326 1333
1327 rdev = regulator_dev_lookup(dev, id, &ret); 1334 rdev = regulator_dev_lookup(dev, id, &ret);