]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'topic/fix/hda' into topic/hda
authorTakashi Iwai <tiwai@suse.de>
Thu, 13 Nov 2008 13:38:00 +0000 (14:38 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 13 Nov 2008 13:38:00 +0000 (14:38 +0100)
Conflicts:
sound/pci/hda/patch_sigmatel.c

1  2 
sound/pci/hda/patch_sigmatel.c

index ec8f5ab9c54dc707235630e18ad1d6cbd00a725c,1633ef2c654a269682ef89c92541ab5f09e7ff2a..58d832c3835acb272fd560225acf0d44b3882f1f
@@@ -2613,16 -2594,28 +2615,16 @@@ static int stac92xx_add_control_temp(st
  {
        struct snd_kcontrol_new *knew;
  
 -      if (spec->num_kctl_used >= spec->num_kctl_alloc) {
 -              int num = spec->num_kctl_alloc + NUM_CONTROL_ALLOC;
 -
 -              knew = kcalloc(num + 1, sizeof(*knew), GFP_KERNEL); /* array + terminator */
 -              if (! knew)
 -                      return -ENOMEM;
 -              if (spec->kctl_alloc) {
 -                      memcpy(knew, spec->kctl_alloc, sizeof(*knew) * spec->num_kctl_alloc);
 -                      kfree(spec->kctl_alloc);
 -              }
 -              spec->kctl_alloc = knew;
 -              spec->num_kctl_alloc = num;
 -      }
 -
 -      knew = &spec->kctl_alloc[spec->num_kctl_used];
 +      snd_array_init(&spec->kctls, sizeof(*knew), 32);
 +      knew = snd_array_new(&spec->kctls);
 +      if (!knew)
 +              return -ENOMEM;
-       *knew = stac92xx_control_templates[type];
+       *knew = *ktemp;
        knew->index = idx;
        knew->name = kstrdup(name, GFP_KERNEL);
-       if (! knew->name)
+       if (!knew->name)
                return -ENOMEM;
        knew->private_value = val;
 -      spec->num_kctl_used++;
        return 0;
  }