]> git.hungrycats.org Git - linux/commitdiff
[ARM] Fix dma_mmap() size argument.
authorRussell King <rmk@flint.arm.linux.org.uk>
Fri, 25 Feb 2005 19:47:46 +0000 (19:47 +0000)
committerRussell King <rmk@flint.arm.linux.org.uk>
Fri, 25 Feb 2005 19:47:46 +0000 (19:47 +0000)
We were passing the size of the region in pages, where as
remap_pfn_range expected the size in bytes.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
arch/arm/mm/consistent.c

index 3c2bde8e357ba770d590e492117e21b414dc2ff3..915cee5c1a21b9a8f57735ca051f4f3c85f3a2e8 100644 (file)
@@ -293,7 +293,8 @@ static int dma_mmap(struct device *dev, struct vm_area_struct *vma,
                        vma->vm_flags |= VM_RESERVED;
                        ret = remap_pfn_range(vma, vma->vm_start,
                                              page_to_pfn(c->vm_pages) + off,
-                                             user_size, vma->vm_page_prot);
+                                             user_size << PAGE_SHIFT,
+                                             vma->vm_page_prot);
                }
        }