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/corgi.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/corgi.c')
-rw-r--r-- | sound/soc/pxa/corgi.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c index 146973ae0974..02263e5d8f03 100644 --- a/sound/soc/pxa/corgi.c +++ b/sound/soc/pxa/corgi.c | |||
@@ -276,18 +276,16 @@ static const struct snd_kcontrol_new wm8731_corgi_controls[] = { | |||
276 | */ | 276 | */ |
277 | static int corgi_wm8731_init(struct snd_soc_codec *codec) | 277 | static int corgi_wm8731_init(struct snd_soc_codec *codec) |
278 | { | 278 | { |
279 | int i, err; | 279 | int err; |
280 | 280 | ||
281 | snd_soc_dapm_nc_pin(codec, "LLINEIN"); | 281 | snd_soc_dapm_nc_pin(codec, "LLINEIN"); |
282 | snd_soc_dapm_nc_pin(codec, "RLINEIN"); | 282 | snd_soc_dapm_nc_pin(codec, "RLINEIN"); |
283 | 283 | ||
284 | /* Add corgi specific controls */ | 284 | /* Add corgi specific controls */ |
285 | for (i = 0; i < ARRAY_SIZE(wm8731_corgi_controls); i++) { | 285 | err = snd_soc_add_controls(codec, wm8731_corgi_controls, |
286 | err = snd_ctl_add(codec->card, | 286 | ARRAY_SIZE(wm8731_corgi_controls)); |
287 | snd_soc_cnew(&wm8731_corgi_controls[i], codec, NULL)); | 287 | if (err < 0) |
288 | if (err < 0) | 288 | return err; |
289 | return err; | ||
290 | } | ||
291 | 289 | ||
292 | /* Add corgi specific widgets */ | 290 | /* Add corgi specific widgets */ |
293 | snd_soc_dapm_new_controls(codec, wm8731_dapm_widgets, | 291 | snd_soc_dapm_new_controls(codec, wm8731_dapm_widgets, |