aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-11-23 07:37:40 -0500
committerMark Brown <broonie@kernel.org>2014-11-24 13:38:54 -0500
commit955efc8f50eb11d1c85daca6db7943c63dc5c2e7 (patch)
tree60e4c6416333835c36ce05f6289c280eac7594e7
parent5d01410fe4d92081f349b013a2e7a95429e4f2c9 (diff)
ASoC: wm8990: 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. Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/wm8990.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
index 03e43e3f395e..8a584229310a 100644
--- a/sound/soc/codecs/wm8990.c
+++ b/sound/soc/codecs/wm8990.c
@@ -1271,18 +1271,6 @@ static struct snd_soc_dai_driver wm8990_dai = {
1271 .ops = &wm8990_dai_ops, 1271 .ops = &wm8990_dai_ops,
1272}; 1272};
1273 1273
1274static int wm8990_suspend(struct snd_soc_codec *codec)
1275{
1276 wm8990_set_bias_level(codec, SND_SOC_BIAS_OFF);
1277 return 0;
1278}
1279
1280static int wm8990_resume(struct snd_soc_codec *codec)
1281{
1282 wm8990_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
1283 return 0;
1284}
1285
1286/* 1274/*
1287 * initialise the WM8990 driver 1275 * initialise the WM8990 driver
1288 * register the mixer and dsp interfaces with the kernel 1276 * register the mixer and dsp interfaces with the kernel
@@ -1309,19 +1297,11 @@ static int wm8990_probe(struct snd_soc_codec *codec)
1309 return 0; 1297 return 0;
1310} 1298}
1311 1299
1312/* power down chip */
1313static int wm8990_remove(struct snd_soc_codec *codec)
1314{
1315 wm8990_set_bias_level(codec, SND_SOC_BIAS_OFF);
1316 return 0;
1317}
1318
1319static struct snd_soc_codec_driver soc_codec_dev_wm8990 = { 1300static struct snd_soc_codec_driver soc_codec_dev_wm8990 = {
1320 .probe = wm8990_probe, 1301 .probe = wm8990_probe,
1321 .remove = wm8990_remove,
1322 .suspend = wm8990_suspend,
1323 .resume = wm8990_resume,
1324 .set_bias_level = wm8990_set_bias_level, 1302 .set_bias_level = wm8990_set_bias_level,
1303 .suspend_bias_off = true,
1304
1325 .controls = wm8990_snd_controls, 1305 .controls = wm8990_snd_controls,
1326 .num_controls = ARRAY_SIZE(wm8990_snd_controls), 1306 .num_controls = ARRAY_SIZE(wm8990_snd_controls),
1327 .dapm_widgets = wm8990_dapm_widgets, 1307 .dapm_widgets = wm8990_dapm_widgets,