summaryrefslogtreecommitdiff
path: root/sound/pci/ctxfi/ctvmem.c
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2014-09-29 13:03:26 +0400
committerTakashi Iwai <tiwai@suse.de>2014-09-30 12:36:59 +0400
commit0cae90a96c15f2fd3bd139ba5505755c9c9ef2eb (patch)
tree36432fccc1f0898a62bcc083d41cbe10e3075f4c /sound/pci/ctxfi/ctvmem.c
parenta45c4d5142595a9b7907499f6d67f702bc20aeb4 (diff)
downloadlinux-0cae90a96c15f2fd3bd139ba5505755c9c9ef2eb.tar.xz
ALSA: ctxfi: pr_* replaced with dev_*
pr_* macros replaced with dev_* as they are more preffered over pr_*. each file which had pr_* was reviewed manually and replaced with dev_*. here we have actually used the various snd_card which was added to some structures of ctxfi via a previous patch of this series. in the ctvmem.c file we have passed a reference of ct_atc as an argument to get_vm_block function so that it can be used from dev_*. since dev_* will print the device information , so the prefix of "ctxfi" from the various pr_* were also removed. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ctxfi/ctvmem.c')
-rw-r--r--sound/pci/ctxfi/ctvmem.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/pci/ctxfi/ctvmem.c b/sound/pci/ctxfi/ctvmem.c
index 38163f52dd5f..419306ef825f 100644
--- a/sound/pci/ctxfi/ctvmem.c
+++ b/sound/pci/ctxfi/ctvmem.c
@@ -16,6 +16,7 @@
*/
#include "ctvmem.h"
+#include "ctatc.h"
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/io.h>
@@ -29,14 +30,15 @@
* @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) {
- pr_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;
}
@@ -128,10 +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) {
- pr_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;
}