aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8900.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8900.c')
-rw-r--r--sound/soc/codecs/wm8900.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c
index 6767de10ded0..1e08d4f065f2 100644
--- a/sound/soc/codecs/wm8900.c
+++ b/sound/soc/codecs/wm8900.c
@@ -517,22 +517,6 @@ SOC_SINGLE("LINEOUT2 LP -12dB", WM8900_REG_LOUTMIXCTL1,
517 517
518}; 518};
519 519
520/* add non dapm controls */
521static int wm8900_add_controls(struct snd_soc_codec *codec)
522{
523 int err, i;
524
525 for (i = 0; i < ARRAY_SIZE(wm8900_snd_controls); i++) {
526 err = snd_ctl_add(codec->card,
527 snd_soc_cnew(&wm8900_snd_controls[i],
528 codec, NULL));
529 if (err < 0)
530 return err;
531 }
532
533 return 0;
534}
535
536static const struct snd_kcontrol_new wm8900_dapm_loutput2_control = 520static const struct snd_kcontrol_new wm8900_dapm_loutput2_control =
537SOC_DAPM_SINGLE("LINEOUT2L Switch", WM8900_REG_POWER3, 6, 1, 0); 521SOC_DAPM_SINGLE("LINEOUT2L Switch", WM8900_REG_POWER3, 6, 1, 0);
538 522
@@ -1439,7 +1423,8 @@ static int wm8900_probe(struct platform_device *pdev)
1439 goto pcm_err; 1423 goto pcm_err;
1440 } 1424 }
1441 1425
1442 wm8900_add_controls(codec); 1426 snd_soc_add_controls(codec, wm8900_snd_controls,
1427 ARRAY_SIZE(wm8900_snd_controls));
1443 wm8900_add_widgets(codec); 1428 wm8900_add_widgets(codec);
1444 1429
1445 ret = snd_soc_init_card(socdev); 1430 ret = snd_soc_init_card(socdev);