regulator: Use regulator_lock_supply() for get_voltage() too
authorMark Brown <broonie@kernel.org>
Tue, 3 Nov 2015 05:58:14 +0000 (05:58 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 4 Nov 2015 10:16:05 +0000 (10:16 +0000)
commitd9b96d35d2521342fdbcbc7468a0f7dcfaba4147
tree43e895d5a496cc63f4ad04e2b9724068a6495004
parentfc42112c0eaa6fc7c7fe61f8c6fb91b204b4d31d
regulator: Use regulator_lock_supply() for get_voltage() too

Since we need to read voltages of parents as part of setting supply
voltages we need to be able to do get_voltage() internally without
taking locks so reorganize the locking to take locks on the full tree on
entry rather than as we recurse when called externally.

Reported-by: John Stultz <john.stultz@linaro.org>
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/core.c