summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-08-07 15:34:32 +0200
committerTakashi Iwai <tiwai@suse.de>2024-08-08 07:49:46 +0200
commitdef358f9baaa7ca7b04cd8fe1f72af2605f11209 (patch)
tree9fb85b048465cb8673af0419f6d69210e8950379
parent1b28f418e77979629afbe8bdb6bb8c61c96a07f1 (diff)
downloadlinux-def358f9baaa7ca7b04cd8fe1f72af2605f11209.tar.gz
linux-def358f9baaa7ca7b04cd8fe1f72af2605f11209.tar.bz2
linux-def358f9baaa7ca7b04cd8fe1f72af2605f11209.zip
ALSA: trident: Use standard print API
Use the standard print API with dev_*() instead of the old house-baked one. It gives better information and allows dynamically control of debug prints. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20240807133452.9424-43-tiwai@suse.de
-rw-r--r--sound/pci/trident/trident_memory.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/pci/trident/trident_memory.c b/sound/pci/trident/trident_memory.c
index 05de2b9f4ed7..4a36f194c7f8 100644
--- a/sound/pci/trident/trident_memory.c
+++ b/sound/pci/trident/trident_memory.c
@@ -137,14 +137,14 @@ __found_pages:
/*
* check if the given pointer is valid for pages
*/
-static int is_valid_page(unsigned long ptr)
+static int is_valid_page(struct snd_trident *trident, unsigned long ptr)
{
if (ptr & ~0x3fffffffUL) {
- snd_printk(KERN_ERR "max memory size is 1GB!!\n");
+ dev_err(trident->card->dev, "max memory size is 1GB!!\n");
return 0;
}
if (ptr & (SNDRV_TRIDENT_PAGE_SIZE-1)) {
- snd_printk(KERN_ERR "page is not aligned\n");
+ dev_err(trident->card->dev, "page is not aligned\n");
return 0;
}
return 1;
@@ -184,7 +184,7 @@ snd_trident_alloc_sg_pages(struct snd_trident *trident,
for (page = firstpg(blk); page <= lastpg(blk); page++, idx++) {
unsigned long ofs = idx << PAGE_SHIFT;
dma_addr_t addr = snd_pcm_sgbuf_get_addr(substream, ofs);
- if (! is_valid_page(addr)) {
+ if (!is_valid_page(trident, addr)) {
__snd_util_mem_free(hdr, blk);
mutex_unlock(&hdr->block_mutex);
return NULL;
@@ -227,7 +227,7 @@ snd_trident_alloc_cont_pages(struct snd_trident *trident,
addr = runtime->dma_addr;
for (page = firstpg(blk); page <= lastpg(blk); page++,
addr += SNDRV_TRIDENT_PAGE_SIZE) {
- if (! is_valid_page(addr)) {
+ if (!is_valid_page(trident, addr)) {
__snd_util_mem_free(hdr, blk);
mutex_unlock(&hdr->block_mutex);
return NULL;