diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-07-22 02:43:24 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-07-22 02:43:24 -0400 |
commit | 7d339ae99758bc21033d4a19bcd4f7b55f96e24e (patch) | |
tree | a5bb46e47f7c4ae193cdf1a73c361144d6099df8 /sound/pci/hda | |
parent | 13b137ef0367237909bb2dc38babfb8305154676 (diff) | |
parent | 000477a0fe1af14355a52622a77ccce8bfd7230d (diff) |
Merge branch 'topic/misc' into for-linus
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 10 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.c | 4 |
2 files changed, 6 insertions, 8 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 45b4a8d70e08..f26e487eca1c 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) | |||
4957 | { | 4957 | { |
4958 | if (array->used >= array->alloced) { | 4958 | if (array->used >= array->alloced) { |
4959 | int num = array->alloced + array->alloc_align; | 4959 | int num = array->alloced + array->alloc_align; |
4960 | int size = (num + 1) * array->elem_size; | ||
4961 | int oldsize = array->alloced * array->elem_size; | ||
4960 | void *nlist; | 4962 | void *nlist; |
4961 | if (snd_BUG_ON(num >= 4096)) | 4963 | if (snd_BUG_ON(num >= 4096)) |
4962 | return NULL; | 4964 | return NULL; |
4963 | nlist = kcalloc(num + 1, array->elem_size, GFP_KERNEL); | 4965 | nlist = krealloc(array->list, size, GFP_KERNEL); |
4964 | if (!nlist) | 4966 | if (!nlist) |
4965 | return NULL; | 4967 | return NULL; |
4966 | if (array->list) { | 4968 | memset(nlist + oldsize, 0, size - oldsize); |
4967 | memcpy(nlist, array->list, | ||
4968 | array->elem_size * array->alloced); | ||
4969 | kfree(array->list); | ||
4970 | } | ||
4971 | array->list = nlist; | 4969 | array->list = nlist; |
4972 | array->alloced = num; | 4970 | array->alloced = num; |
4973 | } | 4971 | } |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 486f6deb3eee..5cc3d07f715f 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) | |||
2149 | { | 2149 | { |
2150 | if (request_irq(chip->pci->irq, azx_interrupt, | 2150 | if (request_irq(chip->pci->irq, azx_interrupt, |
2151 | chip->msi ? 0 : IRQF_SHARED, | 2151 | chip->msi ? 0 : IRQF_SHARED, |
2152 | "hda_intel", chip)) { | 2152 | KBUILD_MODNAME, chip)) { |
2153 | printk(KERN_ERR "hda-intel: unable to grab IRQ %d, " | 2153 | printk(KERN_ERR "hda-intel: unable to grab IRQ %d, " |
2154 | "disabling device\n", chip->pci->irq); | 2154 | "disabling device\n", chip->pci->irq); |
2155 | if (do_disconnect) | 2155 | if (do_disconnect) |
@@ -2908,7 +2908,7 @@ MODULE_DEVICE_TABLE(pci, azx_ids); | |||
2908 | 2908 | ||
2909 | /* pci_driver definition */ | 2909 | /* pci_driver definition */ |
2910 | static struct pci_driver driver = { | 2910 | static struct pci_driver driver = { |
2911 | .name = "HDA Intel", | 2911 | .name = KBUILD_MODNAME, |
2912 | .id_table = azx_ids, | 2912 | .id_table = azx_ids, |
2913 | .probe = azx_probe, | 2913 | .probe = azx_probe, |
2914 | .remove = __devexit_p(azx_remove), | 2914 | .remove = __devexit_p(azx_remove), |