aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8903.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/wm8903.c')
-rw-r--r--sound/soc/codecs/wm8903.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index bde74546db4a..6ff34b957dce 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -744,21 +744,6 @@ SOC_DOUBLE_R_TLV("Speaker Volume",
744 0, 63, 0, out_tlv), 744 0, 63, 0, out_tlv),
745}; 745};
746 746
747static int wm8903_add_controls(struct snd_soc_codec *codec)
748{
749 int err, i;
750
751 for (i = 0; i < ARRAY_SIZE(wm8903_snd_controls); i++) {
752 err = snd_ctl_add(codec->card,
753 snd_soc_cnew(&wm8903_snd_controls[i],
754 codec, NULL));
755 if (err < 0)
756 return err;
757 }
758
759 return 0;
760}
761
762static const struct snd_kcontrol_new linput_mode_mux = 747static const struct snd_kcontrol_new linput_mode_mux =
763 SOC_DAPM_ENUM("Left Input Mode Mux", linput_mode_enum); 748 SOC_DAPM_ENUM("Left Input Mode Mux", linput_mode_enum);
764 749
@@ -1737,7 +1722,8 @@ static int wm8903_probe(struct platform_device *pdev)
1737 goto err; 1722 goto err;
1738 } 1723 }
1739 1724
1740 wm8903_add_controls(socdev->codec); 1725 snd_soc_add_controls(socdev->codec, wm8903_snd_controls,
1726 ARRAY_SIZE(wm8903_snd_controls));
1741 wm8903_add_widgets(socdev->codec); 1727 wm8903_add_widgets(socdev->codec);
1742 1728
1743 ret = snd_soc_init_card(socdev); 1729 ret = snd_soc_init_card(socdev);