summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/stac9766.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-10-20 10:56:39 +0200
committerMark Brown <broonie@kernel.org>2014-10-22 11:34:13 +0100
commit4c07a43d9691ab1f264337d683dc8655b1edca46 (patch)
tree9c9cf738361f9bfcf542bdd2ee2ad9906ec6e1c0 /sound/soc/codecs/stac9766.c
parentf114040e3ea6e07372334ade75d1ee0775c355e1 (diff)
ASoC: stac9766: 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. The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/stac9766.c')
-rw-r--r--sound/soc/codecs/stac9766.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c
index 53b810d23fea..9878534ccd16 100644
--- a/sound/soc/codecs/stac9766.c
+++ b/sound/soc/codecs/stac9766.c
@@ -254,12 +254,6 @@ static int stac9766_reset(struct snd_soc_codec *codec, int try_warm)
return 0;
}
-static int stac9766_codec_suspend(struct snd_soc_codec *codec)
-{
- stac9766_set_bias_level(codec, SND_SOC_BIAS_OFF);
- return 0;
-}
-
static int stac9766_codec_resume(struct snd_soc_codec *codec)
{
u16 id, reset;
@@ -278,7 +272,6 @@ reset:
reset++;
goto reset;
}
- stac9766_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0;
}
@@ -349,8 +342,6 @@ static int stac9766_codec_probe(struct snd_soc_codec *codec)
goto codec_err;
}
- stac9766_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-
snd_soc_add_codec_controls(codec, stac9766_snd_ac97_controls,
ARRAY_SIZE(stac9766_snd_ac97_controls));
@@ -371,9 +362,9 @@ static struct snd_soc_codec_driver soc_codec_dev_stac9766 = {
.write = stac9766_ac97_write,
.read = stac9766_ac97_read,
.set_bias_level = stac9766_set_bias_level,
+ .suspend_bias_off = true,
.probe = stac9766_codec_probe,
.remove = stac9766_codec_remove,
- .suspend = stac9766_codec_suspend,
.resume = stac9766_codec_resume,
.reg_cache_size = ARRAY_SIZE(stac9766_reg),
.reg_word_size = sizeof(u16),