summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-11-22 16:23:22 +0100
committerTakashi Iwai <tiwai@suse.de>2012-11-22 17:48:05 +0100
commit7009fa568b126a07b2de8ead103e378534453830 (patch)
treeee867e9b026099640ee228fa410acdc190c06e23
parente39ae8564410b8ad9057130ba71eeb6b1ef71d82 (diff)
downloadblackbird-obmc-linux-7009fa568b126a07b2de8ead103e378534453830.tar.gz
blackbird-obmc-linux-7009fa568b126a07b2de8ead103e378534453830.zip
ALSA: ymfpci: Use kmalloc for register buffer for PM
Th buffer to save registers for PM is enough small for kmalloc(), not necessary to use vmalloc(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/ymfpci/ymfpci_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index 3a6f03f9b02f..60e8cb24bd44 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -25,7 +25,6 @@
#include <linux/pci.h>
#include <linux/sched.h>
#include <linux/slab.h>
-#include <linux/vmalloc.h>
#include <linux/mutex.h>
#include <linux/module.h>
@@ -2261,7 +2260,7 @@ static int snd_ymfpci_free(struct snd_ymfpci *chip)
#endif
#ifdef CONFIG_PM_SLEEP
- vfree(chip->saved_regs);
+ kfree(chip->saved_regs);
#endif
if (chip->irq >= 0)
free_irq(chip->irq, chip);
@@ -2471,7 +2470,8 @@ int __devinit snd_ymfpci_create(struct snd_card *card,
}
#ifdef CONFIG_PM_SLEEP
- chip->saved_regs = vmalloc(YDSXGR_NUM_SAVED_REGS * sizeof(u32));
+ chip->saved_regs = kmalloc(YDSXGR_NUM_SAVED_REGS * sizeof(u32),
+ GFP_KERNEL);
if (chip->saved_regs == NULL) {
snd_ymfpci_free(chip);
return -ENOMEM;
OpenPOWER on IntegriCloud