diff options
author | Fabio Estevam <festevam@gmail.com> | 2018-04-23 14:30:27 +0300 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2018-05-19 13:53:46 +0300 |
commit | a70c3ee34b093bf2b007aceda5b444906f8964c7 (patch) | |
tree | 3698eae551f9c02a4c4a61a7437df441302e4604 /arch | |
parent | 046835b4aa22b9ab6aa0bb274e3b71047c4b887d (diff) | |
download | linux-a70c3ee34b093bf2b007aceda5b444906f8964c7.tar.xz |
ARM: 8763/1: dma-mapping: Use vma_pages()
Use vma_pages() function instead of open coding it.
Generated by scripts/coccinelle/api/vma_pages.cocci.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mm/dma-mapping.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 8c398fedbbb6..c25cca69ab46 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -845,7 +845,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; |