summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-10-30 21:01:00 +0100
committerMark Brown <broonie@kernel.org>2014-10-31 17:18:50 +0000
commit6ce13d61dc6cfc3cf6be6bd12faf75bfbc12ea91 (patch)
tree02bd8797fbf55f358c86fa8dbae239d59521fc5c
parente5adb6cddb17f8e76be404f23a2e0db102ee1bd1 (diff)
ASoC: ad1980: Use table based control setup
Makes the code a bit cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/codecs/ad1980.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/codecs/ad1980.c b/sound/soc/codecs/ad1980.c
index 5f076c24d062..9ed4e12c26d1 100644
--- a/sound/soc/codecs/ad1980.c
+++ b/sound/soc/codecs/ad1980.c
@@ -259,9 +259,6 @@ static int ad1980_soc_probe(struct snd_soc_codec *codec)
ext_status = ac97_read(codec, AC97_EXTENDED_STATUS);
ac97_write(codec, AC97_EXTENDED_STATUS, ext_status&~0x3800);
- snd_soc_add_codec_controls(codec, ad1980_snd_ac97_controls,
- ARRAY_SIZE(ad1980_snd_ac97_controls));
-
return 0;
reset_err:
@@ -285,6 +282,8 @@ static struct snd_soc_codec_driver soc_codec_dev_ad1980 = {
.write = ac97_write,
.read = ac97_read,
+ .controls = ad1980_snd_ac97_controls,
+ .num_controls = ARRAY_SIZE(ad1980_snd_ac97_controls),
.dapm_widgets = ad1980_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(ad1980_dapm_widgets),
.dapm_routes = ad1980_dapm_routes,