1
0
Fork 0

alpha: kernel: Use vma_pages()

Replace explicit computation of vma page count by a call to
vma_pages()

Signed-off-by: Shyam Saini <mayhs11saini@gmail.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
hifive-unleashed-5.1
Shyam Saini 2016-10-10 05:47:36 +05:30 committed by Matt Turner
parent 03e1f04414
commit 236d62b03a
1 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ static int __pci_mmap_fits(struct pci_dev *pdev, int num,
unsigned long nr, start, size;
int shift = sparse ? 5 : 0;
nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
nr = vma_pages(vma);
start = vma->vm_pgoff;
size = ((pci_resource_len(pdev, num) - 1) >> (PAGE_SHIFT - shift)) + 1;
@ -255,7 +255,7 @@ static int __legacy_mmap_fits(struct pci_controller *hose,
{
unsigned long nr, start, size;
nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
nr = vma_pages(vma);
start = vma->vm_pgoff;
size = ((res_size - 1) >> PAGE_SHIFT) + 1;