summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-07-22 08:43:24 +0200
committerTakashi Iwai <tiwai@suse.de>2011-07-22 08:43:24 +0200
commit7d339ae99758bc21033d4a19bcd4f7b55f96e24e (patch)
treea5bb46e47f7c4ae193cdf1a73c361144d6099df8 /sound/pci/hda
parent13b137ef0367237909bb2dc38babfb8305154676 (diff)
parent000477a0fe1af14355a52622a77ccce8bfd7230d (diff)
Merge branch 'topic/misc' into for-linus
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_codec.c10
-rw-r--r--sound/pci/hda/hda_intel.c4
2 files changed, 6 insertions, 8 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 45b4a8d70e0..f26e487eca1 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -4957,17 +4957,15 @@ void *snd_array_new(struct snd_array *array)
{
if (array->used >= array->alloced) {
int num = array->alloced + array->alloc_align;
+ int size = (num + 1) * array->elem_size;
+ int oldsize = array->alloced * array->elem_size;
void *nlist;
if (snd_BUG_ON(num >= 4096))
return NULL;
- nlist = kcalloc(num + 1, array->elem_size, GFP_KERNEL);
+ nlist = krealloc(array->list, size, GFP_KERNEL);
if (!nlist)
return NULL;
- if (array->list) {
- memcpy(nlist, array->list,
- array->elem_size * array->alloced);
- kfree(array->list);
- }
+ memset(nlist + oldsize, 0, size - oldsize);
array->list = nlist;
array->alloced = num;
}
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 486f6deb3ee..5cc3d07f715 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2149,7 +2149,7 @@ static int azx_acquire_irq(struct azx *chip, int do_disconnect)
{
if (request_irq(chip->pci->irq, azx_interrupt,
chip->msi ? 0 : IRQF_SHARED,
- "hda_intel", chip)) {
+ KBUILD_MODNAME, chip)) {
printk(KERN_ERR "hda-intel: unable to grab IRQ %d, "
"disabling device\n", chip->pci->irq);
if (do_disconnect)
@@ -2908,7 +2908,7 @@ MODULE_DEVICE_TABLE(pci, azx_ids);
/* pci_driver definition */
static struct pci_driver driver = {
- .name = "HDA Intel",
+ .name = KBUILD_MODNAME,
.id_table = azx_ids,
.probe = azx_probe,
.remove = __devexit_p(azx_remove),