Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae6a5d37 authored by Russell King's avatar Russell King Committed by Mark Brown
Browse files

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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent f4a75d2e
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -178,7 +178,7 @@ static int kirkwood_dma_open(struct snd_pcm_substream *substream)
	}
	}


	dram = mv_mbus_dram_info();
	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) {
	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
		prdata->play_stream = substream;
		prdata->play_stream = substream;
		kirkwood_dma_conf_mbus_windows(priv->io,
		kirkwood_dma_conf_mbus_windows(priv->io,