From: Lars-Peter Clausen Date: Thu, 30 Oct 2014 20:01:08 +0000 (+0100) Subject: ASoC: wm9713: Use table based control setup X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c1359ca303ee5125827c0d2a65f0c86d491dc993;p=linux-beck.git ASoC: wm9713: Use table based control setup Makes the code a bit cleaner. Signed-off-by: Lars-Peter Clausen Acked-by: Charles Keepax Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index 38e17d45cfef..ba8c276b9dcf 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c @@ -1216,9 +1216,6 @@ static int wm9713_soc_probe(struct snd_soc_codec *codec) reg = ac97_read(codec, AC97_CD) & 0x7fff; ac97_write(codec, AC97_CD, reg); - snd_soc_add_codec_controls(codec, wm9713_snd_ac97_controls, - ARRAY_SIZE(wm9713_snd_ac97_controls)); - return 0; reset_err: @@ -1248,6 +1245,9 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9713 = { .reg_word_size = sizeof(u16), .reg_cache_step = 2, .reg_cache_default = wm9713_reg, + + .controls = wm9713_snd_ac97_controls, + .num_controls = ARRAY_SIZE(wm9713_snd_ac97_controls), .dapm_widgets = wm9713_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(wm9713_dapm_widgets), .dapm_routes = wm9713_audio_map,