summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-08-07 12:55:01 +0200
committerChristoph Hellwig <hch@lst.de>2019-09-04 11:13:18 +0200
commit07d841a625bc5faee167adc296d04cbca7779703 (patch)
tree99584479af7fd3fda7810d6c802bc71d2efb1d73
parentALSA: pcm: use dma_can_mmap() to check if a device supports dma_mmap_* (diff)
downloadlinux-07d841a625bc5faee167adc296d04cbca7779703.tar.xz
linux-07d841a625bc5faee167adc296d04cbca7779703.zip
arm-nommu: call dma_mmap_from_dev_coherent directly
There is no need to go through dma_common_mmap for the arm-nommu dma mmap implementation as the only possible memory not handled above could be that from the per-device coherent pool. Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--arch/arm/mm/dma-mapping-nommu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mm/dma-mapping-nommu.c b/arch/arm/mm/dma-mapping-nommu.c
index 52b82559d99b..db9247898300 100644
--- a/arch/arm/mm/dma-mapping-nommu.c
+++ b/arch/arm/mm/dma-mapping-nommu.c
@@ -68,8 +68,9 @@ static int arm_nommu_dma_mmap(struct device *dev, struct vm_area_struct *vma,
if (dma_mmap_from_global_coherent(vma, cpu_addr, size, &ret))
return ret;
-
- return dma_common_mmap(dev, vma, cpu_addr, dma_addr, size, attrs);
+ if (dma_mmap_from_dev_coherent(dev, vma, cpu_addr, size, &ret))
+ return ret;
+ return -ENXIO;
}