From: Lars-Peter Clausen Date: Wed, 5 Nov 2014 09:46:31 +0000 (+0100) Subject: ASoC: sn95031: Use table based control setup X-Git-Tag: v3.19-rc1~119^2~20^2~11^6~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0c239fa6ebd20dd55d8978502d78b7c17441351a;p=karo-tx-linux.git ASoC: sn95031: Use table based control setup Makes the code a bit cleaner. Signed-off-by: Lars-Peter Clausen Acked-by: Vinod Koul Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c index cf8fa40662f0..6167c5996d8e 100644 --- a/sound/soc/codecs/sn95031.c +++ b/sound/soc/codecs/sn95031.c @@ -867,9 +867,6 @@ static int sn95031_codec_probe(struct snd_soc_codec *codec) snd_soc_write(codec, SN95031_SSR2, 0x10); snd_soc_write(codec, SN95031_SSR3, 0x40); - snd_soc_add_codec_controls(codec, sn95031_snd_controls, - ARRAY_SIZE(sn95031_snd_controls)); - return 0; } @@ -886,6 +883,9 @@ static struct snd_soc_codec_driver sn95031_codec = { .remove = sn95031_codec_remove, .set_bias_level = sn95031_set_vaud_bias, .idle_bias_off = true, + + .controls = sn95031_snd_controls, + .num_controls = ARRAY_SIZE(sn95031_snd_controls), .dapm_widgets = sn95031_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(sn95031_dapm_widgets), .dapm_routes = sn95031_audio_map,