]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ASoC: kirkwood-dma: fix use of virt_to_phys()
authorRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 20 Nov 2012 12:17:51 +0000 (12:17 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 21 Nov 2012 01:38:16 +0000 (10:38 +0900)
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>
sound/soc/kirkwood/kirkwood-dma.c

index b9f16598324c9b4b85373b6f55d785011c4d8b68..afe19306625373905cc640bd220543f0a36a5b17 100644 (file)
@@ -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,