aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa/palm27x.c
diff options
context:
space:
mode:
authorPhilipp Zabel <philipp.zabel@gmail.com>2009-03-12 06:07:54 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-03-12 11:43:30 -0400
commiteb5f6d753e337834c7ceb07824ee472e43d9a7a2 (patch)
tree22c549607a8ed5657c98af6ae4ead1b3c0eaaaec /sound/soc/pxa/palm27x.c
parent6f7cb44ba1a5195bf719f9ba1d57bd79e13262c1 (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/palm27x.c')
-rw-r--r--sound/soc/pxa/palm27x.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sound/soc/pxa/palm27x.c b/sound/soc/pxa/palm27x.c
index 29958cd9daec..48a73f64500b 100644
--- a/sound/soc/pxa/palm27x.c
+++ b/sound/soc/pxa/palm27x.c
@@ -146,19 +146,16 @@ static const struct snd_kcontrol_new palm27x_controls[] = {
146 146
147static int palm27x_ac97_init(struct snd_soc_codec *codec) 147static int palm27x_ac97_init(struct snd_soc_codec *codec)
148{ 148{
149 int i, err; 149 int err;
150 150
151 snd_soc_dapm_nc_pin(codec, "OUT3"); 151 snd_soc_dapm_nc_pin(codec, "OUT3");
152 snd_soc_dapm_nc_pin(codec, "MONOOUT"); 152 snd_soc_dapm_nc_pin(codec, "MONOOUT");
153 153
154 /* add palm27x specific controls */ 154 /* add palm27x specific controls */
155 for (i = 0; i < ARRAY_SIZE(palm27x_controls); i++) { 155 err = snd_soc_add_controls(codec, palm27x_controls,
156 err = snd_ctl_add(codec->card, 156 ARRAY_SIZE(palm27x_controls));
157 snd_soc_cnew(&palm27x_controls[i], 157 if (err < 0)
158 codec, NULL)); 158 return err;
159 if (err < 0)
160 return err;
161 }
162 159
163 /* add palm27x specific widgets */ 160 /* add palm27x specific widgets */
164 snd_soc_dapm_new_controls(codec, palm27x_dapm_widgets, 161 snd_soc_dapm_new_controls(codec, palm27x_dapm_widgets,