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
@@ -381,8 +381,7 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
adapter->hw.back = adapter;
|
||||
adapter->msg_enable = netif_msg_init(debug, DEFAULT_DEBUG_LEVEL_SHIFT);
|
||||
|
||||
adapter->hw.hw_addr = ioremap(pci_resource_start(pdev, BAR_0),
|
||||
pci_resource_len(pdev, BAR_0));
|
||||
adapter->hw.hw_addr = pci_ioremap_bar(pdev, BAR_0);
|
||||
if (!adapter->hw.hw_addr) {
|
||||
err = -EIO;
|
||||
goto err_ioremap;
|
||||
|
Reference in New Issue
Block a user