diff options
author | Daniel Mack <daniel@caiaq.de> | 2010-02-08 13:32:59 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-02-10 05:42:56 -0500 |
commit | c0ff4bcd2e8505b09e0bedc74d08ad2da1e326f8 (patch) | |
tree | 0ab7fee70cb9821baf177b63c7eda96a92d5d37f /sound/soc | |
parent | 22313eafe92aeec1db9839f5afb71675bf2a5c33 (diff) |
ASoC: cs4270: enable regulators at probe time
Enable the bulk regulators at probe time so we can safely disable them
again when going to suspend without confusing the reference counter.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/cs4270.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index 593bfc7a6986..dfbeb2db61b3 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c | |||
@@ -629,8 +629,17 @@ static int cs4270_probe(struct platform_device *pdev) | |||
629 | if (ret < 0) | 629 | if (ret < 0) |
630 | goto error_free_pcms; | 630 | goto error_free_pcms; |
631 | 631 | ||
632 | ret = regulator_bulk_enable(ARRAY_SIZE(cs4270->supplies), | ||
633 | cs4270->supplies); | ||
634 | if (ret < 0) | ||
635 | goto error_free_regulators; | ||
636 | |||
632 | return 0; | 637 | return 0; |
633 | 638 | ||
639 | error_free_regulators: | ||
640 | regulator_bulk_free(ARRAY_SIZE(cs4270->supplies), | ||
641 | cs4270->supplies); | ||
642 | |||
634 | error_free_pcms: | 643 | error_free_pcms: |
635 | snd_soc_free_pcms(socdev); | 644 | snd_soc_free_pcms(socdev); |
636 | 645 | ||
@@ -650,6 +659,7 @@ static int cs4270_remove(struct platform_device *pdev) | |||
650 | struct cs4270_private *cs4270 = codec->private_data; | 659 | struct cs4270_private *cs4270 = codec->private_data; |
651 | 660 | ||
652 | snd_soc_free_pcms(socdev); | 661 | snd_soc_free_pcms(socdev); |
662 | regulator_bulk_disable(ARRAY_SIZE(cs4270->supplies), cs4270->supplies); | ||
653 | regulator_bulk_free(ARRAY_SIZE(cs4270->supplies), cs4270->supplies); | 663 | regulator_bulk_free(ARRAY_SIZE(cs4270->supplies), cs4270->supplies); |
654 | 664 | ||
655 | return 0; | 665 | return 0; |