ASoC: tpa6130a2: Fix unbalanced regulator disables
authorJarkko Nikula <jhnikula@gmail.com>
Thu, 28 Oct 2010 11:05:40 +0000 (14:05 +0300)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Sat, 30 Oct 2010 16:33:38 +0000 (17:33 +0100)
commit63f7526f26f0a9291ac3f7a986aa18ebfb61ec19
tree64a8dc4234432cfc064e3ae81e86d7bc8498c0d2
parent1bc13b2e3518ff7856924d7c2bdf06196f605260
ASoC: tpa6130a2: Fix unbalanced regulator disables

This driver has unbalanced regulator_disable when doing module loading and
unloading. This is because tpa6130a2_probe followed by tpa6130a2_remove
calls twice tpa6130a2_power(0). Fix this by implementing a state checking
in tpa6130a2_power.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
sound/soc/codecs/tpa6130a2.c