aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2019-02-18 20:29:14 +0100
committerMark Brown <broonie@kernel.org>2019-03-18 15:01:37 +0000
commita48f127519d916b9576c213a9ca6b79e7f926d2d (patch)
treea04ee2916c2021cf9b367c3267ebcdf8db65a75a /drivers/regulator/core.c
parentregulator: da9063: Convert to use regulator_set/get_current_limit_regmap (diff)
downloadlinux-dev-a48f127519d916b9576c213a9ca6b79e7f926d2d.tar.xz
linux-dev-a48f127519d916b9576c213a9ca6b79e7f926d2d.zip
regulator: core: Fix application of "drop lockdep annotation in drms_uA_update()"
[The original commit was sent against -next but needed to be sent as a bugfix, however -next had some additional changes which needed to be reverted. Now everything is all in one branch applying the rest of the changes to fix up the merge issue -- broonie] commit e5e21f70bfd3 ("regulator: core: Take lock before applying system load") took the regulator lock before calling drms_uA_update() in order to silence a lockdep warning during regulator_register(). However, we are not supposed to need locks at this point as the regulator is in the process of being registered, so there should be no possibility of concurrent access. Instead, remove the unnecessary locking and simply drop the lockdep annotation, since it is no longer valid. Fixes: e5e21f70bfd3 ("regulator: core: Take lock before applying system load") Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r--drivers/regulator/core.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 68473d0cc57e..5a9ebcf7fe7a 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)