diff options
Diffstat (limited to 'sound/pci/ctxfi/ctvmem.c')
-rw-r--r-- | sound/pci/ctxfi/ctvmem.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/pci/ctxfi/ctvmem.c b/sound/pci/ctxfi/ctvmem.c index 6109490b83e8..419306ef825f 100644 --- a/sound/pci/ctxfi/ctvmem.c +++ b/sound/pci/ctxfi/ctvmem.c | |||
@@ -16,6 +16,7 @@ | |||
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include "ctvmem.h" | 18 | #include "ctvmem.h" |
19 | #include "ctatc.h" | ||
19 | #include <linux/slab.h> | 20 | #include <linux/slab.h> |
20 | #include <linux/mm.h> | 21 | #include <linux/mm.h> |
21 | #include <linux/io.h> | 22 | #include <linux/io.h> |
@@ -29,15 +30,15 @@ | |||
29 | * @size must be page aligned. | 30 | * @size must be page aligned. |
30 | * */ | 31 | * */ |
31 | static struct ct_vm_block * | 32 | static struct ct_vm_block * |
32 | get_vm_block(struct ct_vm *vm, unsigned int size) | 33 | get_vm_block(struct ct_vm *vm, unsigned int size, struct ct_atc *atc) |
33 | { | 34 | { |
34 | struct ct_vm_block *block = NULL, *entry; | 35 | struct ct_vm_block *block = NULL, *entry; |
35 | struct list_head *pos; | 36 | struct list_head *pos; |
36 | 37 | ||
37 | size = CT_PAGE_ALIGN(size); | 38 | size = CT_PAGE_ALIGN(size); |
38 | if (size > vm->size) { | 39 | if (size > vm->size) { |
39 | printk(KERN_ERR "ctxfi: Fail! No sufficient device virtual " | 40 | dev_err(atc->card->dev, |
40 | "memory space available!\n"); | 41 | "Fail! No sufficient device virtual memory space available!\n"); |
41 | return NULL; | 42 | return NULL; |
42 | } | 43 | } |
43 | 44 | ||
@@ -129,11 +130,12 @@ ct_vm_map(struct ct_vm *vm, struct snd_pcm_substream *substream, int size) | |||
129 | unsigned int pte_start; | 130 | unsigned int pte_start; |
130 | unsigned i, pages; | 131 | unsigned i, pages; |
131 | unsigned long *ptp; | 132 | unsigned long *ptp; |
133 | struct ct_atc *atc = snd_pcm_substream_chip(substream); | ||
132 | 134 | ||
133 | block = get_vm_block(vm, size); | 135 | block = get_vm_block(vm, size, atc); |
134 | if (block == NULL) { | 136 | if (block == NULL) { |
135 | printk(KERN_ERR "ctxfi: No virtual memory block that is big " | 137 | dev_err(atc->card->dev, |
136 | "enough to allocate!\n"); | 138 | "No virtual memory block that is big enough to allocate!\n"); |
137 | return NULL; | 139 | return NULL; |
138 | } | 140 | } |
139 | 141 | ||