diff options
author | Philipp Zabel <philipp.zabel@gmail.com> | 2009-03-12 06:07:54 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-03-12 11:43:30 -0400 |
commit | eb5f6d753e337834c7ceb07824ee472e43d9a7a2 (patch) | |
tree | 22c549607a8ed5657c98af6ae4ead1b3c0eaaaec /sound/soc/pxa/tosa.c | |
parent | 6f7cb44ba1a5195bf719f9ba1d57bd79e13262c1 (diff) |
ASoC: Replace remaining uses of snd_soc_cnew with snd_soc_add_controls.
The drivers are basically duplicating the same code over and over.
As snd_soc_cnew is going to be made static some time after the next
merge window, we might as well convert them now.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/pxa/tosa.c')
-rw-r--r-- | sound/soc/pxa/tosa.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c index 09b5bada03b9..fc781374b1bf 100644 --- a/sound/soc/pxa/tosa.c +++ b/sound/soc/pxa/tosa.c | |||
@@ -188,18 +188,16 @@ static const struct snd_kcontrol_new tosa_controls[] = { | |||
188 | 188 | ||
189 | static int tosa_ac97_init(struct snd_soc_codec *codec) | 189 | static int tosa_ac97_init(struct snd_soc_codec *codec) |
190 | { | 190 | { |
191 | int i, err; | 191 | int err; |
192 | 192 | ||
193 | snd_soc_dapm_nc_pin(codec, "OUT3"); | 193 | snd_soc_dapm_nc_pin(codec, "OUT3"); |
194 | snd_soc_dapm_nc_pin(codec, "MONOOUT"); | 194 | snd_soc_dapm_nc_pin(codec, "MONOOUT"); |
195 | 195 | ||
196 | /* add tosa specific controls */ | 196 | /* add tosa specific controls */ |
197 | for (i = 0; i < ARRAY_SIZE(tosa_controls); i++) { | 197 | err = snd_soc_add_controls(codec, tosa_controls, |
198 | err = snd_ctl_add(codec->card, | 198 | ARRAY_SIZE(tosa_controls)); |
199 | snd_soc_cnew(&tosa_controls[i],codec, NULL)); | 199 | if (err < 0) |
200 | if (err < 0) | 200 | return err; |
201 | return err; | ||
202 | } | ||
203 | 201 | ||
204 | /* add tosa specific widgets */ | 202 | /* add tosa specific widgets */ |
205 | snd_soc_dapm_new_controls(codec, tosa_dapm_widgets, | 203 | snd_soc_dapm_new_controls(codec, tosa_dapm_widgets, |