aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8728.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8728.c')
-rw-r--r--sound/soc/codecs/wm8728.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/sound/soc/codecs/wm8728.c b/sound/soc/codecs/wm8728.c
index 80b11983e137..defa310bc7d9 100644
--- a/sound/soc/codecs/wm8728.c
+++ b/sound/soc/codecs/wm8728.c
@@ -92,21 +92,6 @@ SOC_DOUBLE_R_TLV("Digital Playback Volume", WM8728_DACLVOL, WM8728_DACRVOL,
92SOC_SINGLE("Deemphasis", WM8728_DACCTL, 1, 1, 0), 92SOC_SINGLE("Deemphasis", WM8728_DACCTL, 1, 1, 0),
93}; 93};
94 94
95static int wm8728_add_controls(struct snd_soc_codec *codec)
96{
97 int err, i;
98
99 for (i = 0; i < ARRAY_SIZE(wm8728_snd_controls); i++) {
100 err = snd_ctl_add(codec->card,
101 snd_soc_cnew(&wm8728_snd_controls[i],
102 codec, NULL));
103 if (err < 0)
104 return err;
105 }
106
107 return 0;
108}
109
110/* 95/*
111 * DAPM controls. 96 * DAPM controls.
112 */ 97 */
@@ -330,7 +315,8 @@ static int wm8728_init(struct snd_soc_device *socdev)
330 /* power on device */ 315 /* power on device */
331 wm8728_set_bias_level(codec, SND_SOC_BIAS_STANDBY); 316 wm8728_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
332 317
333 wm8728_add_controls(codec); 318 snd_soc_add_controls(codec, wm8728_snd_controls,
319 ARRAY_SIZE(wm8728_snd_controls));
334 wm8728_add_widgets(codec); 320 wm8728_add_widgets(codec);
335 ret = snd_soc_init_card(socdev); 321 ret = snd_soc_init_card(socdev);
336 if (ret < 0) { 322 if (ret < 0) {