diff options
author | Arjan van de Ven <arjan@infradead.org> | 2008-10-21 00:42:39 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-10-31 00:53:48 -0400 |
commit | 275f165fa970174f8a98205529750e8abb6c0a33 (patch) | |
tree | a9548561c6fd50de8a0d706704ba6c6f22bc7b19 /drivers/net/s2io.c | |
parent | 842e08bd6891bd78b4c3d2e0c4a94bebb32ab3ad (diff) |
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>
Diffstat (limited to 'drivers/net/s2io.c')
-rw-r--r-- | drivers/net/s2io.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 66c1a80c2680..5663fa7aa3da 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -7917,8 +7917,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) | |||
7917 | goto mem_alloc_failed; | 7917 | goto mem_alloc_failed; |
7918 | } | 7918 | } |
7919 | 7919 | ||
7920 | sp->bar0 = ioremap(pci_resource_start(pdev, 0), | 7920 | sp->bar0 = pci_ioremap_bar(pdev, 0); |
7921 | pci_resource_len(pdev, 0)); | ||
7922 | if (!sp->bar0) { | 7921 | if (!sp->bar0) { |
7923 | DBG_PRINT(ERR_DBG, "%s: Neterion: cannot remap io mem1\n", | 7922 | DBG_PRINT(ERR_DBG, "%s: Neterion: cannot remap io mem1\n", |
7924 | dev->name); | 7923 | dev->name); |
@@ -7926,8 +7925,7 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre) | |||
7926 | goto bar0_remap_failed; | 7925 | goto bar0_remap_failed; |
7927 | } | 7926 | } |
7928 | 7927 | ||
7929 | sp->bar1 = ioremap(pci_resource_start(pdev, 2), | 7928 | sp->bar1 = pci_ioremap_bar(pdev, 2); |
7930 | pci_resource_len(pdev, 2)); | ||
7931 | if (!sp->bar1) { | 7929 | if (!sp->bar1) { |
7932 | DBG_PRINT(ERR_DBG, "%s: Neterion: cannot remap io mem2\n", | 7930 | DBG_PRINT(ERR_DBG, "%s: Neterion: cannot remap io mem2\n", |
7933 | dev->name); | 7931 | dev->name); |