regulator: Fix deadlock on removal of regulators with supplies
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 28 Mar 2012 20:17:55 +0000 (21:17 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 29 Mar 2012 21:50:14 +0000 (22:50 +0100)
If a regulator with a supply is being unregistered we will call
regulator_put() to release the supply with the regulator_list_mutex held
but this deadlocks as regulator_put() takes the same lock. Fix this by
releasing the supply before we take the mutex in regulator_unregister().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

No differences found