diff options
author | Mark Brown <broonie@kernel.org> | 2019-05-06 22:52:14 +0900 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-05-06 22:52:14 +0900 |
commit | e2a23affe6a6a15111ae56edd7e4f3c9673ef201 (patch) | |
tree | a69d90bfe04ff687e8ccde00ddac9aea357e33e6 /drivers/regulator/core.c | |
parent | c7b5128f72efc732be776569a862bb4169eb1dbc (diff) | |
parent | 498209445124920b365ef43aac93d6f1acbaa1b7 (diff) | |
download | linux-stable-e2a23affe6a6a15111ae56edd7e4f3c9673ef201.tar.gz linux-stable-e2a23affe6a6a15111ae56edd7e4f3c9673ef201.tar.bz2 linux-stable-e2a23affe6a6a15111ae56edd7e4f3c9673ef201.zip |
Merge branch 'regulator-5.2' into regulator-next
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r-- | drivers/regulator/core.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 35a7d020afec..955a0a15b9cb 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -1339,9 +1339,7 @@ static int set_machine_constraints(struct regulator_dev *rdev, * We'll only apply the initial system load if an * initial mode wasn't specified. */ - regulator_lock(rdev); drms_uA_update(rdev); - regulator_unlock(rdev); } if ((rdev->constraints->ramp_delay || rdev->constraints->ramp_disable) @@ -3005,7 +3003,7 @@ EXPORT_SYMBOL_GPL(regulator_get_linear_step); * @min_uV: Minimum required voltage in uV. * @max_uV: Maximum required voltage in uV. * - * Returns a boolean or a negative error code. + * Returns a boolean. */ int regulator_is_supported_voltage(struct regulator *regulator, int min_uV, int max_uV) @@ -3029,7 +3027,7 @@ int regulator_is_supported_voltage(struct regulator *regulator, ret = regulator_count_voltages(regulator); if (ret < 0) - return ret; + return 0; voltages = ret; for (i = 0; i < voltages; i++) { @@ -4345,8 +4343,6 @@ int regulator_bulk_get(struct device *dev, int num_consumers, consumers[i].supply); if (IS_ERR(consumers[i].consumer)) { ret = PTR_ERR(consumers[i].consumer); - dev_err(dev, "Failed to get supply '%s': %d\n", - consumers[i].supply, ret); consumers[i].consumer = NULL; goto err; } @@ -4355,6 +4351,13 @@ int regulator_bulk_get(struct device *dev, int num_consumers, return 0; err: + if (ret != -EPROBE_DEFER) + dev_err(dev, "Failed to get supply '%s': %d\n", + consumers[i].supply, ret); + else + dev_dbg(dev, "Failed to get supply '%s', deferring\n", + consumers[i].supply); + while (--i >= 0) regulator_put(consumers[i].consumer); |