summaryrefslogtreecommitdiff
path: root/target/linux/s3c24xx
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2009-06-28 21:05:35 +0000
committerLars-Peter Clausen <lars@metafoo.de>2009-06-28 21:05:35 +0000
commit4fdc4703edc743dc1699fe1194e24f36e7d0a226 (patch)
treea234cfe6c158ad8fc8b14fcf1d1898b6a8b96d9f /target/linux/s3c24xx
parent9773bc411804103560c425f563ab9567f78e5262 (diff)
downloadmtk-20170518-4fdc4703edc743dc1699fe1194e24f36e7d0a226.zip
mtk-20170518-4fdc4703edc743dc1699fe1194e24f36e7d0a226.tar.gz
mtk-20170518-4fdc4703edc743dc1699fe1194e24f36e7d0a226.tar.bz2
gta02_wm8753: Use snd_soc_add_controls to add machine specific controls.
SVN-Revision: 16613
Diffstat (limited to 'target/linux/s3c24xx')
-rw-r--r--target/linux/s3c24xx/files-2.6.30/sound/soc/s3c24xx/gta02_wm8753.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/target/linux/s3c24xx/files-2.6.30/sound/soc/s3c24xx/gta02_wm8753.c b/target/linux/s3c24xx/files-2.6.30/sound/soc/s3c24xx/gta02_wm8753.c
index 4abb18a..1f8f9db 100644
--- a/target/linux/s3c24xx/files-2.6.30/sound/soc/s3c24xx/gta02_wm8753.c
+++ b/target/linux/s3c24xx/files-2.6.30/sound/soc/s3c24xx/gta02_wm8753.c
@@ -338,7 +338,7 @@ static const struct snd_kcontrol_new wm8753_neo1973_gta02_controls[] = {
*/
static int neo1973_gta02_wm8753_init(struct snd_soc_codec *codec)
{
- int i, err;
+ int err;
/* set up NC codec pins */
snd_soc_dapm_nc_pin(codec, "OUT3");
@@ -351,13 +351,11 @@ static int neo1973_gta02_wm8753_init(struct snd_soc_codec *codec)
ARRAY_SIZE(wm8753_dapm_widgets));
/* add neo1973 gta02 specific controls */
- for (i = 0; i < ARRAY_SIZE(wm8753_neo1973_gta02_controls); i++) {
- err = snd_ctl_add(codec->card,
- snd_soc_cnew(&wm8753_neo1973_gta02_controls[i],
- codec, NULL));
- if (err < 0)
- return err;
- }
+ err = snd_soc_add_controls(codec, wm8753_neo1973_gta02_controls,
+ ARRAY_SIZE(wm8753_neo1973_gta02_controls));
+
+ if (err < 0)
+ return err;
/* set up neo1973 gta02 specific audio path audio_map */
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));