diff options
author | Philipp Zabel <philipp.zabel@gmail.com> | 2009-03-12 06:07:54 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-03-12 11:43:30 -0400 |
commit | eb5f6d753e337834c7ceb07824ee472e43d9a7a2 (patch) | |
tree | 22c549607a8ed5657c98af6ae4ead1b3c0eaaaec /sound/soc/codecs/tlv320aic26.c | |
parent | 6f7cb44ba1a5195bf719f9ba1d57bd79e13262c1 (diff) |
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 <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/tlv320aic26.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic26.c | 11 |
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"); |