diff options
author | Nicolin Chen <b42378@freescale.com> | 2013-11-12 18:10:00 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-12 22:09:23 -0500 |
commit | 92a2e1cb53ba649e620b7f02a15ad1fb949c6355 (patch) | |
tree | 2556276630f2f65d89c46faf659fc26a7a271274 | |
parent | 1112b9e2c9c8ae10551a7d34667a6189f971cdba (diff) |
sound/soc/pxa/mmp-pcm.c: use gen_pool_dma_alloc() to allocate dma buffer
Since gen_pool_dma_alloc() is introduced, we implement it to simplify code.
Signed-off-by: Nicolin Chen <b42378@freescale.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | sound/soc/pxa/mmp-pcm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/pxa/mmp-pcm.c b/sound/soc/pxa/mmp-pcm.c index 8235e231d89c..7929e19b0ef5 100644 --- a/sound/soc/pxa/mmp-pcm.c +++ b/sound/soc/pxa/mmp-pcm.c | |||
@@ -201,10 +201,9 @@ static int mmp_pcm_preallocate_dma_buffer(struct snd_pcm_substream *substream, | |||
201 | if (!gpool) | 201 | if (!gpool) |
202 | return -ENOMEM; | 202 | return -ENOMEM; |
203 | 203 | ||
204 | buf->area = (unsigned char *)gen_pool_alloc(gpool, size); | 204 | buf->area = gen_pool_dma_alloc(gpool, size, &buf->addr); |
205 | if (!buf->area) | 205 | if (!buf->area) |
206 | return -ENOMEM; | 206 | return -ENOMEM; |
207 | buf->addr = gen_pool_virt_to_phys(gpool, (unsigned long)buf->area); | ||
208 | buf->bytes = size; | 207 | buf->bytes = size; |
209 | return 0; | 208 | return 0; |
210 | } | 209 | } |