diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-10-20 12:56:35 +0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-10-22 14:30:56 +0400 |
commit | 46804120c59b1374f8beb2b8636ffe6b0a7c16c8 (patch) | |
tree | 028bbf7d61a0d60e8db132daf35effad30089309 /sound/soc/codecs/max9850.c | |
parent | f114040e3ea6e07372334ade75d1ee0775c355e1 (diff) | |
download | linux-46804120c59b1374f8beb2b8636ffe6b0a7c16c8.tar.xz |
ASoC: max9850: Cleanup manual bias level transitions
Set the CODEC driver's suspend_bias_off flag rather than manually going to
SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes
the code a bit shorter and cleaner.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/max9850.c')
-rw-r--r-- | sound/soc/codecs/max9850.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/sound/soc/codecs/max9850.c b/sound/soc/codecs/max9850.c index 4fdf5aaa236f..10f8e47ce2c2 100644 --- a/sound/soc/codecs/max9850.c +++ b/sound/soc/codecs/max9850.c @@ -291,25 +291,6 @@ static struct snd_soc_dai_driver max9850_dai = { .ops = &max9850_dai_ops, }; -#ifdef CONFIG_PM -static int max9850_suspend(struct snd_soc_codec *codec) -{ - max9850_set_bias_level(codec, SND_SOC_BIAS_OFF); - - return 0; -} - -static int max9850_resume(struct snd_soc_codec *codec) -{ - max9850_set_bias_level(codec, SND_SOC_BIAS_STANDBY); - - return 0; -} -#else -#define max9850_suspend NULL -#define max9850_resume NULL -#endif - static int max9850_probe(struct snd_soc_codec *codec) { /* enable zero-detect */ @@ -324,9 +305,8 @@ static int max9850_probe(struct snd_soc_codec *codec) static struct snd_soc_codec_driver soc_codec_dev_max9850 = { .probe = max9850_probe, - .suspend = max9850_suspend, - .resume = max9850_resume, .set_bias_level = max9850_set_bias_level, + .suspend_bias_off = true, .controls = max9850_controls, .num_controls = ARRAY_SIZE(max9850_controls), |