diff mbox

[03/14] ASoC: ad1980: Use table based control setup

Message ID 1414699271-22797-4-git-send-email-lars@metafoo.de (mailing list archive)
State Accepted
Commit 6ce13d61dc6cfc3cf6be6bd12faf75bfbc12ea91
Headers show

Commit Message

Lars-Peter Clausen Oct. 30, 2014, 8:01 p.m. UTC
Makes the code a bit cleaner.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/ad1980.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Mark Brown Oct. 31, 2014, 5:19 p.m. UTC | #1
On Thu, Oct 30, 2014 at 09:01:00PM +0100, Lars-Peter Clausen wrote:
> Makes the code a bit cleaner.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/codecs/ad1980.c b/sound/soc/codecs/ad1980.c
index 5f076c2..9ed4e12 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,