]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: core: Fix application of "drop lockdep annotation in drms_uA_update()"
authorMark Brown <broonie@kernel.org>
Mon, 18 Feb 2019 19:29:14 +0000 (20:29 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 18 Mar 2019 15:01:37 +0000 (15:01 +0000)
commit22c904eb59f24ed38fb9f6e4701ddb116ad32839
treea04ee2916c2021cf9b367c3267ebcdf8db65a75a
parent0a0613d3f9d73d2d4d82b9e65ca944cef88a6c68
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 86ddd0072d0c ("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: 86ddd0072d0c ("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>
drivers/regulator/core.c