summaryrefslogtreecommitdiff
path: root/sound/core/memalloc.c
diff options
context:
space:
mode:
authorNicolin Chen <b42378@freescale.com>2013-11-14 14:32:15 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-15 09:32:23 +0900
commit07968fe4acec6d49e39520ef407ea7f6874b7c2e (patch)
tree14bfc8ab313cd71d47561b3924b578346033176d /sound/core/memalloc.c
parent0791a6057cb60d12ec5e3182b99e6ffa8044ee3a (diff)
sound/core/memalloc.c: use gen_pool_dma_alloc() to allocate iram buffer
Since gen_pool_dma_alloc() is introduced, we implement it to simplify code. Signed-off-by: Nicolin Chen <b42378@freescale.com> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'sound/core/memalloc.c')
-rw-r--r--sound/core/memalloc.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c
index 9d93f02c6285..5e1c7bc73b29 100644
--- a/sound/core/memalloc.c
+++ b/sound/core/memalloc.c
@@ -184,11 +184,7 @@ static void snd_malloc_dev_iram(struct snd_dma_buffer *dmab, size_t size)
/* Assign the pool into private_data field */
dmab->private_data = pool;
- dmab->area = (void *)gen_pool_alloc(pool, size);
- if (!dmab->area)
- return;
-
- dmab->addr = gen_pool_virt_to_phys(pool, (unsigned long)dmab->area);
+ dmab->area = gen_pool_dma_alloc(pool, size, &dmab->addr);
}
/**