Commit ae6a5d37725853325a2b3460165fbc5613ce2916

Authored by Russell King
Committed by Mark Brown
1 parent f4a75d2eb7

ASoC: kirkwood-dma: fix use of virt_to_phys()

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

sound/soc/kirkwood/kirkwood-dma.c
... ... @@ -178,7 +178,7 @@
178 178 }
179 179  
180 180 dram = mv_mbus_dram_info();
181   - addr = virt_to_phys(substream->dma_buffer.area);
  181 + addr = substream->dma_buffer.addr;
182 182 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
183 183 prdata->play_stream = substream;
184 184 kirkwood_dma_conf_mbus_windows(priv->io,