]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
arm-nommu: call dma_mmap_from_dev_coherent directly
authorChristoph Hellwig <hch@lst.de>
Wed, 7 Aug 2019 10:55:01 +0000 (13:55 +0300)
committerChristoph Hellwig <hch@lst.de>
Wed, 4 Sep 2019 09:13:18 +0000 (11:13 +0200)
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>
arch/arm/mm/dma-mapping-nommu.c

index 52b82559d99b3d608b4347a4060b7e686311d72a..db92478983005c9e73ecec9e080bf9eab9bba2ae 100644 (file)
@@ -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;
 }