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/s3c24xx | |
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/s3c24xx')
-rw-r--r-- | sound/soc/s3c24xx/neo1973_wm8753.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sound/soc/s3c24xx/neo1973_wm8753.c b/sound/soc/s3c24xx/neo1973_wm8753.c index 5f6aeec0437d..289fadf60b10 100644 --- a/sound/soc/s3c24xx/neo1973_wm8753.c +++ b/sound/soc/s3c24xx/neo1973_wm8753.c | |||
@@ -498,7 +498,7 @@ static const struct snd_kcontrol_new wm8753_neo1973_controls[] = { | |||
498 | */ | 498 | */ |
499 | static int neo1973_wm8753_init(struct snd_soc_codec *codec) | 499 | static int neo1973_wm8753_init(struct snd_soc_codec *codec) |
500 | { | 500 | { |
501 | int i, err; | 501 | int err; |
502 | 502 | ||
503 | pr_debug("Entered %s\n", __func__); | 503 | pr_debug("Entered %s\n", __func__); |
504 | 504 | ||
@@ -518,13 +518,10 @@ static int neo1973_wm8753_init(struct snd_soc_codec *codec) | |||
518 | set_scenario_endpoints(codec, NEO_AUDIO_OFF); | 518 | set_scenario_endpoints(codec, NEO_AUDIO_OFF); |
519 | 519 | ||
520 | /* add neo1973 specific controls */ | 520 | /* add neo1973 specific controls */ |
521 | for (i = 0; i < ARRAY_SIZE(wm8753_neo1973_controls); i++) { | 521 | err = snd_soc_add_controls(codec, wm8753_neo1973_controls, |
522 | err = snd_ctl_add(codec->card, | 522 | ARRAY_SIZE(8753_neo1973_controls)); |
523 | snd_soc_cnew(&wm8753_neo1973_controls[i], | 523 | if (err < 0) |
524 | codec, NULL)); | 524 | return err; |
525 | if (err < 0) | ||
526 | return err; | ||
527 | } | ||
528 | 525 | ||
529 | /* set up neo1973 specific audio routes */ | 526 | /* set up neo1973 specific audio routes */ |
530 | err = snd_soc_dapm_add_routes(codec, dapm_routes, | 527 | err = snd_soc_dapm_add_routes(codec, dapm_routes, |