aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00pci.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2008-10-21 00:42:39 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-10-31 00:53:48 -0400
commit275f165fa970174f8a98205529750e8abb6c0a33 (patch)
treea9548561c6fd50de8a0d706704ba6c6f22bc7b19 /drivers/net/wireless/rt2x00/rt2x00pci.c
parent842e08bd6891bd78b4c3d2e0c4a94bebb32ab3ad (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/wireless/rt2x00/rt2x00pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00pci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
index adf2876ed8ab..62449da577e5 100644
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -222,8 +222,7 @@ static int rt2x00pci_alloc_reg(struct rt2x00_dev *rt2x00dev)
222{ 222{
223 struct pci_dev *pci_dev = to_pci_dev(rt2x00dev->dev); 223 struct pci_dev *pci_dev = to_pci_dev(rt2x00dev->dev);
224 224
225 rt2x00dev->csr.base = ioremap(pci_resource_start(pci_dev, 0), 225 rt2x00dev->csr.base = pci_ioremap_bar(pci_dev, 0);
226 pci_resource_len(pci_dev, 0));
227 if (!rt2x00dev->csr.base) 226 if (!rt2x00dev->csr.base)
228 goto exit; 227 goto exit;
229 228