diff options
author | Nicolin Chen <b42378@freescale.com> | 2013-11-05 17:07:11 +1100 |
---|---|---|
committer | Nicolin Chen <b42378@freescale.com> | 2013-11-05 18:58:00 +0800 |
commit | fb8153044d2f37335c4e206c1f0a4ca78a4b0f47 (patch) | |
tree | 52007c45c2b7b78e6dfb6642e52e905697b3191c /sound | |
parent | d78744b48bb44955ae6ccddcc578115b6a12f2bb (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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/core/memalloc.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c index 809fd79ecad6..e0af805c4727 100644 --- a/sound/core/memalloc.c +++ b/sound/core/memalloc.c @@ -181,11 +181,7 @@ 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); } /** |