diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-11-22 10:23:22 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-11-22 11:48:05 -0500 |
commit | 7009fa568b126a07b2de8ead103e378534453830 (patch) | |
tree | ee867e9b026099640ee228fa410acdc190c06e23 /sound/pci | |
parent | e39ae8564410b8ad9057130ba71eeb6b1ef71d82 (diff) |
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>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/ymfpci/ymfpci_main.c | 6 |
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 @@ | |||
25 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | #include <linux/vmalloc.h> | ||
29 | #include <linux/mutex.h> | 28 | #include <linux/mutex.h> |
30 | #include <linux/module.h> | 29 | #include <linux/module.h> |
31 | 30 | ||
@@ -2261,7 +2260,7 @@ static int snd_ymfpci_free(struct snd_ymfpci *chip) | |||
2261 | #endif | 2260 | #endif |
2262 | 2261 | ||
2263 | #ifdef CONFIG_PM_SLEEP | 2262 | #ifdef CONFIG_PM_SLEEP |
2264 | vfree(chip->saved_regs); | 2263 | kfree(chip->saved_regs); |
2265 | #endif | 2264 | #endif |
2266 | if (chip->irq >= 0) | 2265 | if (chip->irq >= 0) |
2267 | free_irq(chip->irq, chip); | 2266 | free_irq(chip->irq, chip); |
@@ -2471,7 +2470,8 @@ int __devinit snd_ymfpci_create(struct snd_card *card, | |||
2471 | } | 2470 | } |
2472 | 2471 | ||
2473 | #ifdef CONFIG_PM_SLEEP | 2472 | #ifdef CONFIG_PM_SLEEP |
2474 | chip->saved_regs = vmalloc(YDSXGR_NUM_SAVED_REGS * sizeof(u32)); | 2473 | chip->saved_regs = kmalloc(YDSXGR_NUM_SAVED_REGS * sizeof(u32), |
2474 | GFP_KERNEL); | ||
2475 | if (chip->saved_regs == NULL) { | 2475 | if (chip->saved_regs == NULL) { |
2476 | snd_ymfpci_free(chip); | 2476 | snd_ymfpci_free(chip); |
2477 | return -ENOMEM; | 2477 | return -ENOMEM; |