PCI: Add BAR index argument to pci_mmap_page_range()
In all cases we know which BAR it is. Passing it in means that arch code (or generic code; watch this space) won't have to go looking for it again. Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:

committed by
Bjorn Helgaas

parent
dca40b186b
commit
f66e225828
@@ -1041,7 +1041,7 @@ static int pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr,
|
||||
pci_resource_to_user(pdev, bar, res, &start, &end);
|
||||
vma->vm_pgoff += start >> PAGE_SHIFT;
|
||||
mmap_type = res->flags & IORESOURCE_MEM ? pci_mmap_mem : pci_mmap_io;
|
||||
return pci_mmap_page_range(pdev, vma, mmap_type, write_combine);
|
||||
return pci_mmap_page_range(pdev, bar, vma, mmap_type, write_combine);
|
||||
}
|
||||
|
||||
static int pci_mmap_resource_uc(struct file *filp, struct kobject *kobj,
|
||||
|
Reference in New Issue
Block a user