From: Marek Szyprowski Date: Tue, 15 May 2012 17:04:13 +0000 (+0200) Subject: ARM: dma-mapping: use dma_mmap_from_coherent() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=47142f07eea32e9c108f548a4b06c28bec7df6e4;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ARM: dma-mapping: use dma_mmap_from_coherent() Signed-off-by: Marek Szyprowski --- diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index db23ae4aaaab..7ec08636fda5 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);