diff options
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 1d487624ad94..07b38fbe4e03 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -966,8 +966,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
966 | hw->back = adapter; | 966 | hw->back = adapter; |
967 | 967 | ||
968 | err = -EIO; | 968 | err = -EIO; |
969 | hw->hw_addr = ioremap(pci_resource_start(pdev, BAR_0), | 969 | hw->hw_addr = pci_ioremap_bar(pdev, BAR_0); |
970 | pci_resource_len(pdev, BAR_0)); | ||
971 | if (!hw->hw_addr) | 970 | if (!hw->hw_addr) |
972 | goto err_ioremap; | 971 | goto err_ioremap; |
973 | 972 | ||
@@ -1015,9 +1014,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
1015 | * because it depends on mac_type */ | 1014 | * because it depends on mac_type */ |
1016 | if ((hw->mac_type == e1000_ich8lan) && | 1015 | if ((hw->mac_type == e1000_ich8lan) && |
1017 | (pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) { | 1016 | (pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) { |
1018 | hw->flash_address = | 1017 | hw->flash_address = pci_ioremap_bar(pdev, 1); |
1019 | ioremap(pci_resource_start(pdev, 1), | ||
1020 | pci_resource_len(pdev, 1)); | ||
1021 | if (!hw->flash_address) | 1018 | if (!hw->flash_address) |
1022 | goto err_flashmap; | 1019 | goto err_flashmap; |
1023 | } | 1020 | } |