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 <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c
index 5f1ccb2..7d16ca3 100644
--- a/drivers/net/wan/dscc4.c
+++ b/drivers/net/wan/dscc4.c
@@ -730,8 +730,7 @@
goto err_free_mmio_region_1;
}
- ioaddr = ioremap(pci_resource_start(pdev, 0),
- pci_resource_len(pdev, 0));
+ ioaddr = pci_ioremap_bar(pdev, 0);
if (!ioaddr) {
printk(KERN_ERR "%s: cannot remap MMIO region %llx @ %llx\n",
DRV_NAME, (unsigned long long)pci_resource_len(pdev, 0),