summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/dummy.h
diff options
context:
space:
mode:
authorJeffrey Carlyle <jeff.carlyle@motorola.com>2010-10-08 14:49:19 -0500
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-10-28 22:40:31 +0100
commit8cbf811dfd027bde8504e541d0009c5722b98be5 (patch)
tree0f7190a0c3680485ad7893a36d37967ae8f3c526 /drivers/regulator/dummy.h
parent688fe99a439f7c9dfcc52fbf7cb347f140a2dc8b (diff)
regulator: avoid deadlock when disabling regulator with supply
I have a regulator A that sets regulator B as its supply. When I call set_supply to add B as the supply for A, regulator A gets added to the supply_list for regulator B. When I call regulator_disable(A), I end up with a call chain like this: regulator_disable(A) > mutex_lock(A) > _regulator_disable(A) >> _regulator_disable(B) >>> _notifier_call_chain(B) >>>> mutex_lock(A) Which results in dead lock since we are trying to acquire the mutex lock for regulator A which we already hold. This patch addresses this issue by moving the call to disable regulator B outside of the lock aquired inside the initial call to regulator_disable. This change also addresses the issue of not acquiring the mutex for regulator B before calling _regulator_disable(B). Signed-off-by: Jeffrey Carlyle <jeff.carlyle@motorola.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator/dummy.h')
0 files changed, 0 insertions, 0 deletions