Skip to content

Commit

Permalink
ASoC: kirkwood-dma: fix use of virt_to_phys()
Browse files Browse the repository at this point in the history
This is part of a patch found in Rabeeh Khoury's git tree for the
cubox.

You can not use virt_to_phys() on the address returned from
dma_alloc_coherent(); it may not be part of the kernel direct-mapped
memory.  Fix this to use the DMA address instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Russell King authored and Mark Brown committed Nov 21, 2012
1 parent f4a75d2 commit ae6a5d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/kirkwood/kirkwood-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ static int kirkwood_dma_open(struct snd_pcm_substream *substream)
}

dram = mv_mbus_dram_info();
addr = virt_to_phys(substream->dma_buffer.area);
addr = substream->dma_buffer.addr;
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
prdata->play_stream = substream;
kirkwood_dma_conf_mbus_windows(priv->io,
Expand Down

0 comments on commit ae6a5d3

Please sign in to comment.