Skip to content

Commit

Permalink
sound/soc/davinci/davinci-pcm.c: use gen_pool_dma_alloc() in davinci-…
Browse files Browse the repository at this point in the history
…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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Nicolin Chen authored and Linus Torvalds committed Nov 13, 2013
1 parent 288342e commit 1112b9e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/soc/davinci/davinci-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1112b9e

Please sign in to comment.