summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorNicolin Chen <b42378@freescale.com>2013-11-05 16:56:51 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2013-11-05 16:56:51 +1100
commit5c4233bf917d36776f4ce991c08cc7aa28eec2b8 (patch)
tree7466092f9ad2a173de63c593c497842cc6653f4d /sound
parentff753dea71c532ee5477a6e28055b6cc053f71c4 (diff)
sound/soc/davinci/davinci-pcm.c: use gen_pool_dma_alloc() in davinci-pcm.c
Since gen_pool_dma_alloc() is introduced, we implement it to simplify code. Signed-off-by: Nicolin Chen <b42378@freescale.com> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/davinci/davinci-pcm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c
index 8460edce1c3b..443e9e599a75 100644
--- a/sound/soc/davinci/davinci-pcm.c
+++ b/sound/soc/davinci/davinci-pcm.c
@@ -267,10 +267,9 @@ static int allocate_sram(struct snd_pcm_substream *substream,
return 0;
ppcm->period_bytes_max = size;
- iram_virt = (void *)gen_pool_alloc(sram_pool, size);
+ iram_virt = gen_pool_dma_alloc(sram_pool, size, &iram_phys);
if (!iram_virt)
goto exit1;
- iram_phys = gen_pool_virt_to_phys(sram_pool, (unsigned)iram_virt);
iram_dma = kzalloc(sizeof(*iram_dma), GFP_KERNEL);
if (!iram_dma)
goto exit2;