aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tlv320aic26.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/tlv320aic26.c')
-rw-r--r--sound/soc/codecs/tlv320aic26.c11
1 files changed, 4 insertions, 7 deletions
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)
324{ 324{
325 struct snd_soc_device *socdev = platform_get_drvdata(pdev); 325 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
326 struct snd_soc_codec *codec; 326 struct snd_soc_codec *codec;
327 struct snd_kcontrol *kcontrol;
328 struct aic26 *aic26; 327 struct aic26 *aic26;
329 int i, ret, err; 328 int ret, err;
330 329
331 dev_info(&pdev->dev, "Probing AIC26 SoC CODEC driver\n"); 330 dev_info(&pdev->dev, "Probing AIC26 SoC CODEC driver\n");
332 dev_dbg(&pdev->dev, "socdev=%p\n", socdev); 331 dev_dbg(&pdev->dev, "socdev=%p\n", socdev);
@@ -353,11 +352,9 @@ static int aic26_probe(struct platform_device *pdev)
353 352
354 /* register controls */ 353 /* register controls */
355 dev_dbg(&pdev->dev, "Registering controls\n"); 354 dev_dbg(&pdev->dev, "Registering controls\n");
356 for (i = 0; i < ARRAY_SIZE(aic26_snd_controls); i++) { 355 err = snd_soc_add_controls(codec, aic26_snd_controls,
357 kcontrol = snd_soc_cnew(&aic26_snd_controls[i], codec, NULL); 356 ARRAY_SIZE(aic26_snd_controls));
358 err = snd_ctl_add(codec->card, kcontrol); 357 WARN_ON(err < 0);
359 WARN_ON(err < 0);
360 }
361 358
362 /* CODEC is setup, we can register the card now */ 359 /* CODEC is setup, we can register the card now */
363 dev_dbg(&pdev->dev, "Registering card\n"); 360 dev_dbg(&pdev->dev, "Registering card\n");