[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <290c4ed99f88c1d07544bf5f8f0c9a1d09395bed.1383306365.git.b42378@freescale.com>
Date: Fri, 1 Nov 2013 19:48:21 +0800
From: Nicolin Chen <b42378@...escale.com>
To: <akpm@...ux-foundation.org>, <joe@...ches.com>, <nsekhar@...com>,
<khilman@...prootsystems.com>, <linux@....linux.org.uk>,
<dan.j.williams@...el.com>, <vinod.koul@...el.com>,
<m.chehab@...sung.com>, <hjk@...sjkoch.de>,
<gregkh@...uxfoundation.org>, <perex@...ex.cz>, <tiwai@...e.de>,
<lgirdwood@...il.com>, <broonie@...nel.org>,
<rmk+kernel@....linux.org.uk>, <eric.y.miao@...il.com>,
<haojian.zhuang@...il.com>
CC: <linux-kernel@...r.kernel.org>,
<davinci-linux-open-source@...ux.davincidsp.com>,
<linux-arm-kernel@...ts.infradead.org>,
<dmaengine@...r.kernel.org>, <linux-media@...r.kernel.org>,
<alsa-devel@...a-project.org>
Subject: [PATCH][RESEND 8/8] ASoC: pxa: 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@...escale.com>
---
sound/soc/pxa/mmp-pcm.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/pxa/mmp-pcm.c b/sound/soc/pxa/mmp-pcm.c
index 8235e23..7929e19 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;
}
--
1.8.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists