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:
Arjan van de Ven
2008-10-20 21:42:39 -07:00
committed by Jeff Garzik
parent 842e08bd68
commit 275f165fa9
12 changed files with 14 additions and 25 deletions

View File

@@ -10087,8 +10087,7 @@ static int __devinit bnx2x_init_dev(struct pci_dev *pdev,
dev->irq = pdev->irq;
bp->regview = ioremap_nocache(dev->base_addr,
pci_resource_len(pdev, 0));
bp->regview = pci_ioremap_bar(pdev, 0);
if (!bp->regview) {
printk(KERN_ERR PFX "Cannot map register space, aborting\n");
rc = -ENOMEM;