diff options
-rw-r--r-- | drivers/regulator/ab3100.c | 4 | ||||
-rw-r--r-- | drivers/regulator/core.c | 9 | ||||
-rw-r--r-- | drivers/regulator/s2mps11.c | 1 |
3 files changed, 11 insertions, 3 deletions
diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c index 77b46d0b37a6..e10febe9ec34 100644 --- a/drivers/regulator/ab3100.c +++ b/drivers/regulator/ab3100.c | |||
@@ -498,7 +498,7 @@ static int ab3100_regulator_register(struct platform_device *pdev, | |||
498 | struct ab3100_platform_data *plfdata, | 498 | struct ab3100_platform_data *plfdata, |
499 | struct regulator_init_data *init_data, | 499 | struct regulator_init_data *init_data, |
500 | struct device_node *np, | 500 | struct device_node *np, |
501 | int id) | 501 | unsigned long id) |
502 | { | 502 | { |
503 | struct regulator_desc *desc; | 503 | struct regulator_desc *desc; |
504 | struct ab3100_regulator *reg; | 504 | struct ab3100_regulator *reg; |
@@ -646,7 +646,7 @@ ab3100_regulator_of_probe(struct platform_device *pdev, struct device_node *np) | |||
646 | err = ab3100_regulator_register( | 646 | err = ab3100_regulator_register( |
647 | pdev, NULL, ab3100_regulator_matches[i].init_data, | 647 | pdev, NULL, ab3100_regulator_matches[i].init_data, |
648 | ab3100_regulator_matches[i].of_node, | 648 | ab3100_regulator_matches[i].of_node, |
649 | (int) ab3100_regulator_matches[i].driver_data); | 649 | (unsigned long)ab3100_regulator_matches[i].driver_data); |
650 | if (err) { | 650 | if (err) { |
651 | ab3100_regulators_remove(pdev); | 651 | ab3100_regulators_remove(pdev); |
652 | return err; | 652 | return err; |
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(®ulator_list_mutex); | 1332 | mutex_lock(®ulator_list_mutex); |
1326 | 1333 | ||
1327 | rdev = regulator_dev_lookup(dev, id, &ret); | 1334 | rdev = regulator_dev_lookup(dev, id, &ret); |
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c index d9e557990577..cd0b9e35a56d 100644 --- a/drivers/regulator/s2mps11.c +++ b/drivers/regulator/s2mps11.c | |||
@@ -441,6 +441,7 @@ common_reg: | |||
441 | for (i = 0; i < S2MPS11_REGULATOR_MAX; i++) { | 441 | for (i = 0; i < S2MPS11_REGULATOR_MAX; i++) { |
442 | if (!reg_np) { | 442 | if (!reg_np) { |
443 | config.init_data = pdata->regulators[i].initdata; | 443 | config.init_data = pdata->regulators[i].initdata; |
444 | config.of_node = pdata->regulators[i].reg_node; | ||
444 | } else { | 445 | } else { |
445 | config.init_data = rdata[i].init_data; | 446 | config.init_data = rdata[i].init_data; |
446 | config.of_node = rdata[i].of_node; | 447 | config.of_node = rdata[i].of_node; |