pci: use pci_ioremap_bar() in drivers/net
Use the newly introduced pci_ioremap_bar() function in drivers/net. pci_ioremap_bar() just takes a pci device and a bar number, with the goal of making it really hard to get wrong, while also having a central place to stick sanity checks. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
committed by
Jeff Garzik
parent
842e08bd68
commit
275f165fa9
@ -7917,8 +7917,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
|
||||
goto mem_alloc_failed;
|
||||
}
|
||||
|
||||
sp->bar0 = ioremap(pci_resource_start(pdev, 0),
|
||||
pci_resource_len(pdev, 0));
|
||||
sp->bar0 = pci_ioremap_bar(pdev, 0);
|
||||
if (!sp->bar0) {
|
||||
DBG_PRINT(ERR_DBG, "%s: Neterion: cannot remap io mem1\n",
|
||||
dev->name);
|
||||
@ -7926,8 +7925,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
|
||||
goto bar0_remap_failed;
|
||||
}
|
||||
|
||||
sp->bar1 = ioremap(pci_resource_start(pdev, 2),
|
||||
pci_resource_len(pdev, 2));
|
||||
sp->bar1 = pci_ioremap_bar(pdev, 2);
|
||||
if (!sp->bar1) {
|
||||
DBG_PRINT(ERR_DBG, "%s: Neterion: cannot remap io mem2\n",
|
||||
dev->name);
|
||||
|
Reference in New Issue
Block a user