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
@@ -363,7 +363,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev,
|
||||
ioaddr = pci_resource_start (pdev, 0);
|
||||
#else
|
||||
ioaddr = pci_resource_start (pdev, 1);
|
||||
ioaddr = (long) ioremap (ioaddr, pci_resource_len (pdev, 1));
|
||||
ioaddr = (long) pci_ioremap_bar(pdev, 1);
|
||||
if (!ioaddr) {
|
||||
dev_err(&pdev->dev, "ioremap failed\n");
|
||||
goto err_out_free_netdev;
|
||||
|
Reference in New Issue
Block a user