OSDN Git Service

Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm
[uclinux-h8/linux.git] / arch / arm / mm / dma-mapping.c
index ada8eb2..af27f1c 100644 (file)
@@ -831,7 +831,7 @@ static int __arm_dma_mmap(struct device *dev, struct vm_area_struct *vma,
                 unsigned long attrs)
 {
        int ret;
-       unsigned long nr_vma_pages = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
+       unsigned long nr_vma_pages = vma_pages(vma);
        unsigned long nr_pages = PAGE_ALIGN(size) >> PAGE_SHIFT;
        unsigned long pfn = dma_to_pfn(dev, dma_addr);
        unsigned long off = vma->vm_pgoff;
@@ -1151,15 +1151,6 @@ int arm_dma_supported(struct device *dev, u64 mask)
        return __dma_supported(dev, mask, false);
 }
 
-#define PREALLOC_DMA_DEBUG_ENTRIES     4096
-
-static int __init dma_debug_do_init(void)
-{
-       dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
-       return 0;
-}
-core_initcall(dma_debug_do_init);
-
 #ifdef CONFIG_ARM_DMA_USE_IOMMU
 
 static int __dma_info_to_prot(enum dma_data_direction dir, unsigned long attrs)