diff options
author | Nicolin Chen <b42378@freescale.com> | 2013-11-05 16:56:52 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-11-05 16:56:52 +1100 |
commit | 2a95f5e1a871a6e267ca717b7e586b12a89b05dc (patch) | |
tree | e4392d565ece13382e4fb4d82f5637ba32357a31 /sound | |
parent | 5c4233bf917d36776f4ce991c08cc7aa28eec2b8 (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>
Diffstat (limited to 'sound')
-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, if (!gpool) return -ENOMEM; - buf->area = (unsigned char *)gen_pool_alloc(gpool, size); + buf->area = gen_pool_dma_alloc(gpool, size, &buf->addr); if (!buf->area) return -ENOMEM; - buf->addr = gen_pool_virt_to_phys(gpool, (unsigned long)buf->area); buf->bytes = size; return 0; } |