]> git.baikalelectronics.ru Git - kernel.git/commit
regulator: vctrl: Use locked regulator_get_voltage in probe path
authorChen-Yu Tsai <wenst@chromium.org>
Wed, 25 Aug 2021 03:37:03 +0000 (11:37 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 25 Aug 2021 13:17:52 +0000 (14:17 +0100)
commitc1feab9db01daea928541c35caf4c63b5dce7599
treed59a33883bfe92c381d3b1a4f6d73123ef7a1ba7
parentdadc65222849f61b6494f06aa519053382eeb6ba
regulator: vctrl: Use locked regulator_get_voltage in probe path

In commit 8168a596145c ("regulator: vctrl-regulator: Avoid deadlock getting
and setting the voltage"), all calls to get/set the voltage of the
control regulator were switched to unlocked versions to avoid deadlocks.
However, the call in the probe path is done without regulator locks
held. In this case the locked version should be used.

Switch back to the locked regulator_get_voltage() in the probe path to
avoid any mishaps.

Fixes: 8168a596145c ("regulator: vctrl-regulator: Avoid deadlock getting and setting the voltage")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20210825033704.3307263-2-wenst@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/vctrl-regulator.c