]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/soc/pxa/poodle.c
Merge branch 'origin' into devel
[linux-2.6-omap-h63xx.git] / sound / soc / pxa / poodle.c
index fb17a0a5a093c7d33a0b1c140d0214a574a598dc..a51058f66747fdad48b6b5dde422fd8d6d62de27 100644 (file)
@@ -27,8 +27,6 @@
 
 #include <asm/mach-types.h>
 #include <asm/hardware/locomo.h>
-#include <mach/pxa-regs.h>
-#include <mach/hardware.h>
 #include <mach/poodle.h>
 #include <mach/audio.h>
 
@@ -241,19 +239,17 @@ static const struct snd_kcontrol_new wm8731_poodle_controls[] = {
  */
 static int poodle_wm8731_init(struct snd_soc_codec *codec)
 {
-       int i, err;
+       int err;
 
        snd_soc_dapm_nc_pin(codec, "LLINEIN");
        snd_soc_dapm_nc_pin(codec, "RLINEIN");
        snd_soc_dapm_enable_pin(codec, "MICIN");
 
        /* Add poodle specific controls */
-       for (i = 0; i < ARRAY_SIZE(wm8731_poodle_controls); i++) {
-               err = snd_ctl_add(codec->card,
-                       snd_soc_cnew(&wm8731_poodle_controls[i], codec, NULL));
-               if (err < 0)
-                       return err;
-       }
+       err = snd_soc_add_controls(codec, wm8731_poodle_controls,
+                               ARRAY_SIZE(wm8731_poodle_controls));
+       if (err < 0)
+               return err;
 
        /* Add poodle specific widgets */
        snd_soc_dapm_new_controls(codec, wm8731_dapm_widgets,