ALSA: ctxfi: pr_* replaced with dev_*
[firefly-linux-kernel-4.4.55.git] / sound / pci / ctxfi / ctvmem.c
index 6109490b83e83294373f36956a5a8a01dd923e20..419306ef825f61c51c50a507c3c249784f613337 100644 (file)
@@ -16,6 +16,7 @@
  */
 
 #include "ctvmem.h"
+#include "ctatc.h"
 #include <linux/slab.h>
 #include <linux/mm.h>
 #include <linux/io.h>
  * @size must be page aligned.
  * */
 static struct ct_vm_block *
-get_vm_block(struct ct_vm *vm, unsigned int size)
+get_vm_block(struct ct_vm *vm, unsigned int size, struct ct_atc *atc)
 {
        struct ct_vm_block *block = NULL, *entry;
        struct list_head *pos;
 
        size = CT_PAGE_ALIGN(size);
        if (size > vm->size) {
-               printk(KERN_ERR "ctxfi: Fail! No sufficient device virtual "
-                                 "memory space available!\n");
+               dev_err(atc->card->dev,
+                       "Fail! No sufficient device virtual memory space available!\n");
                return NULL;
        }
 
@@ -129,11 +130,12 @@ ct_vm_map(struct ct_vm *vm, struct snd_pcm_substream *substream, int size)
        unsigned int pte_start;
        unsigned i, pages;
        unsigned long *ptp;
+       struct ct_atc *atc = snd_pcm_substream_chip(substream);
 
-       block = get_vm_block(vm, size);
+       block = get_vm_block(vm, size, atc);
        if (block == NULL) {
-               printk(KERN_ERR "ctxfi: No virtual memory block that is big "
-                                 "enough to allocate!\n");
+               dev_err(atc->card->dev,
+                       "No virtual memory block that is big enough to allocate!\n");
                return NULL;
        }