summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm9712.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-10-30 23:01:06 +0300
committerMark Brown <broonie@kernel.org>2014-10-31 20:32:07 +0300
commit9a812c6b7a2092e20b4b78ed0ec6614a89e96dfd (patch)
treee1d540ad10f3b65da5f3ea8f6f9d4b0a1ab12b51 /sound/soc/codecs/wm9712.c
parent12ced338ab8858d11ef5b11b65c3dc612d9551c9 (diff)
downloadlinux-9a812c6b7a2092e20b4b78ed0ec6614a89e96dfd.tar.xz
ASoC: wm9712: Use table based control setup
Makes the code a bit cleaner. 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>
Diffstat (limited to 'sound/soc/codecs/wm9712.c')
-rw-r--r--sound/soc/codecs/wm9712.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm9712.c b/sound/soc/codecs/wm9712.c
index c389e5607ab6..f3aab6e1d92a 100644
--- a/sound/soc/codecs/wm9712.c
+++ b/sound/soc/codecs/wm9712.c
@@ -647,8 +647,6 @@ static int wm9712_soc_probe(struct snd_soc_codec *codec)
ac97_write(codec, AC97_VIDEO, ac97_read(codec, AC97_VIDEO) | 0x3000);
wm9712_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
- snd_soc_add_codec_controls(codec, wm9712_snd_ac97_controls,
- ARRAY_SIZE(wm9712_snd_ac97_controls));
return 0;
@@ -675,6 +673,9 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9712 = {
.reg_word_size = sizeof(u16),
.reg_cache_step = 2,
.reg_cache_default = wm9712_reg,
+
+ .controls = wm9712_snd_ac97_controls,
+ .num_controls = ARRAY_SIZE(wm9712_snd_ac97_controls),
.dapm_widgets = wm9712_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(wm9712_dapm_widgets),
.dapm_routes = wm9712_audio_map,