From eb5f6d753e337834c7ceb07824ee472e43d9a7a2 Mon Sep 17 00:00:00 2001 From: Philipp Zabel Date: Thu, 12 Mar 2009 11:07:54 +0100 Subject: 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 Signed-off-by: Mark Brown --- sound/soc/codecs/tlv320aic26.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'sound/soc/codecs/tlv320aic26.c') diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c index a7f333fc579e..3387d9e736ea 100644 --- a/sound/soc/codecs/tlv320aic26.c +++ b/sound/soc/codecs/tlv320aic26.c @@ -324,9 +324,8 @@ static int aic26_probe(struct platform_device *pdev) { struct snd_soc_device *socdev = platform_get_drvdata(pdev); struct snd_soc_codec *codec; - struct snd_kcontrol *kcontrol; struct aic26 *aic26; - int i, ret, err; + int ret, err; dev_info(&pdev->dev, "Probing AIC26 SoC CODEC driver\n"); dev_dbg(&pdev->dev, "socdev=%p\n", socdev); @@ -353,11 +352,9 @@ static int aic26_probe(struct platform_device *pdev) /* register controls */ dev_dbg(&pdev->dev, "Registering controls\n"); - for (i = 0; i < ARRAY_SIZE(aic26_snd_controls); i++) { - kcontrol = snd_soc_cnew(&aic26_snd_controls[i], codec, NULL); - err = snd_ctl_add(codec->card, kcontrol); - WARN_ON(err < 0); - } + err = snd_soc_add_controls(codec, aic26_snd_controls, + ARRAY_SIZE(aic26_snd_controls)); + WARN_ON(err < 0); /* CODEC is setup, we can register the card now */ dev_dbg(&pdev->dev, "Registering card\n"); -- cgit v1.2.3