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/omap | |
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/omap')
-rw-r--r-- | sound/soc/omap/n810.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index 9f037cd0191d..86471fd6340f 100644 --- a/sound/soc/omap/n810.c +++ b/sound/soc/omap/n810.c | |||
@@ -248,7 +248,7 @@ static const struct snd_kcontrol_new aic33_n810_controls[] = { | |||
248 | 248 | ||
249 | static int n810_aic33_init(struct snd_soc_codec *codec) | 249 | static int n810_aic33_init(struct snd_soc_codec *codec) |
250 | { | 250 | { |
251 | int i, err; | 251 | int err; |
252 | 252 | ||
253 | /* Not connected */ | 253 | /* Not connected */ |
254 | snd_soc_dapm_nc_pin(codec, "MONO_LOUT"); | 254 | snd_soc_dapm_nc_pin(codec, "MONO_LOUT"); |
@@ -256,12 +256,10 @@ static int n810_aic33_init(struct snd_soc_codec *codec) | |||
256 | snd_soc_dapm_nc_pin(codec, "HPRCOM"); | 256 | snd_soc_dapm_nc_pin(codec, "HPRCOM"); |
257 | 257 | ||
258 | /* Add N810 specific controls */ | 258 | /* Add N810 specific controls */ |
259 | for (i = 0; i < ARRAY_SIZE(aic33_n810_controls); i++) { | 259 | err = snd_soc_add_controls(codec, aic33_n810_controls, |
260 | err = snd_ctl_add(codec->card, | 260 | ARRAY_SIZE(aic33_n810_controls)); |
261 | snd_soc_cnew(&aic33_n810_controls[i], codec, NULL)); | 261 | if (err < 0) |
262 | if (err < 0) | 262 | return err; |
263 | return err; | ||
264 | } | ||
265 | 263 | ||
266 | /* Add N810 specific widgets */ | 264 | /* Add N810 specific widgets */ |
267 | snd_soc_dapm_new_controls(codec, aic33_dapm_widgets, | 265 | snd_soc_dapm_new_controls(codec, aic33_dapm_widgets, |