aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2016-08-16 14:50:32 -0400
committerMark Brown <broonie@kernel.org>2016-08-16 15:00:44 -0400
commit565f9b073f37e5cb6f80ad0ad71ec1144f87fd9f (patch)
tree355a3ab03e0e431305eff4bafdeaea45baa67203 /drivers/regulator
parent29b4817d4018df78086157ea3a55c1d9424a7cfc (diff)
regulator: Remove support for optional supplies in the bulk API
The patch was based on my missinterpretation of the API and only accidentally worked for me. Let's clean it out to not confuse others. This reverts commit 3ff3f518a135fa4592fe2817e9ac2cce1fa23dc2. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c6
-rw-r--r--drivers/regulator/devres.c7
2 files changed, 4 insertions, 9 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index db320e8fa865..8ccdaf89b1c3 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3483,10 +3483,8 @@ int regulator_bulk_get(struct device *dev, int num_consumers,
3483 consumers[i].consumer = NULL; 3483 consumers[i].consumer = NULL;
3484 3484
3485 for (i = 0; i < num_consumers; i++) { 3485 for (i = 0; i < num_consumers; i++) {
3486 consumers[i].consumer = _regulator_get(dev, 3486 consumers[i].consumer = regulator_get(dev,
3487 consumers[i].supply, 3487 consumers[i].supply);
3488 false,
3489 !consumers[i].optional);
3490 if (IS_ERR(consumers[i].consumer)) { 3488 if (IS_ERR(consumers[i].consumer)) {
3491 ret = PTR_ERR(consumers[i].consumer); 3489 ret = PTR_ERR(consumers[i].consumer);
3492 dev_err(dev, "Failed to get supply '%s': %d\n", 3490 dev_err(dev, "Failed to get supply '%s': %d\n",
diff --git a/drivers/regulator/devres.c b/drivers/regulator/devres.c
index 6ad8ab4c578d..6ec1d400adae 100644
--- a/drivers/regulator/devres.c
+++ b/drivers/regulator/devres.c
@@ -164,11 +164,8 @@ int devm_regulator_bulk_get(struct device *dev, int num_consumers,
164 consumers[i].consumer = NULL; 164 consumers[i].consumer = NULL;
165 165
166 for (i = 0; i < num_consumers; i++) { 166 for (i = 0; i < num_consumers; i++) {
167 consumers[i].consumer = _devm_regulator_get(dev, 167 consumers[i].consumer = devm_regulator_get(dev,
168 consumers[i].supply, 168 consumers[i].supply);
169 consumers[i].optional ?
170 OPTIONAL_GET :
171 NORMAL_GET);
172 if (IS_ERR(consumers[i].consumer)) { 169 if (IS_ERR(consumers[i].consumer)) {
173 ret = PTR_ERR(consumers[i].consumer); 170 ret = PTR_ERR(consumers[i].consumer);
174 dev_err(dev, "Failed to get supply '%s': %d\n", 171 dev_err(dev, "Failed to get supply '%s': %d\n",