summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm9705.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-10-30 23:01:04 +0300
committerMark Brown <broonie@kernel.org>2014-10-31 20:31:39 +0300
commitd7cabb08ba23c87757fb3be01e82f755aad426d1 (patch)
treed6ccdee2206a2833cdbdbfc27307c86f9d59060a /sound/soc/codecs/wm9705.c
parent9cf766f666cc4518e22f185159f285f4e3183230 (diff)
downloadlinux-d7cabb08ba23c87757fb3be01e82f755aad426d1.tar.xz
ASoC: wm9705: 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/wm9705.c')
-rw-r--r--sound/soc/codecs/wm9705.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm9705.c b/sound/soc/codecs/wm9705.c
index 355b28dd6ac9..1650195f6c84 100644
--- a/sound/soc/codecs/wm9705.c
+++ b/sound/soc/codecs/wm9705.c
@@ -347,9 +347,6 @@ static int wm9705_soc_probe(struct snd_soc_codec *codec)
if (ret)
goto reset_err;
- snd_soc_add_codec_controls(codec, wm9705_snd_ac97_controls,
- ARRAY_SIZE(wm9705_snd_ac97_controls));
-
return 0;
reset_err:
@@ -374,6 +371,9 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9705 = {
.reg_word_size = sizeof(u16),
.reg_cache_step = 2,
.reg_cache_default = wm9705_reg,
+
+ .controls = wm9705_snd_ac97_controls,
+ .num_controls = ARRAY_SIZE(wm9705_snd_ac97_controls),
.dapm_widgets = wm9705_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(wm9705_dapm_widgets),
.dapm_routes = wm9705_audio_map,