From: Nicolin Chen Date: Tue, 12 Nov 2013 23:09:58 +0000 (-0800) Subject: sound/soc/davinci/davinci-pcm.c: use gen_pool_dma_alloc() in davinci-pcm.c X-Git-Tag: accepted/tizen/common/20141203.182822~1142^2~94 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1112b9e2c9c8ae10551a7d34667a6189f971cdba;p=platform%2Fkernel%2Flinux-arm64.git 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 Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/sound/soc/davinci/davinci-pcm.c b/sound/soc/davinci/davinci-pcm.c index 8460edc..443e9e5 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;