diff mbox

[PATCHv10,02/11] ARM: dma-mapping: use dma_mmap_from_coherent()

Message ID 1337260441-8121-3-git-send-email-m.szyprowski@samsung.com
State Accepted
Commit 47142f07eea32e9c108f548a4b06c28bec7df6e4
Headers show

Commit Message

Marek Szyprowski May 17, 2012, 1:13 p.m. UTC
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 arch/arm/mm/dma-mapping.c |    3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index db23ae4..7ec0863 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -401,6 +401,9 @@  static int dma_mmap(struct device *dev, struct vm_area_struct *vma,
 	unsigned long user_size, kern_size;
 	struct arm_vmregion *c;
 
+	if (dma_mmap_from_coherent(dev, vma, cpu_addr, size, &ret))
+		return ret;
+
 	user_size = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
 
 	c = arm_vmregion_find(&consistent_head, (unsigned long)cpu_addr);