aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2008-10-21 00:46:01 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-07 12:59:49 -0500
commit8e8ce4b642ce4beb865fb1d67cd8ea883d9ae7d7 (patch)
tree7883335b8321a21a1919517bf590bf163b887533 /drivers/usb/host
parente64a5219296fff11a0da0322b43012265cd3b327 (diff)
USB: use pci_ioremap_bar() in drivers/usb
Use the newly introduced pci_ioremap_bar() function in drivers/usb. 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: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/pci-quirks.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index ae6e70edd745..15e4f1d92c79 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -172,9 +172,9 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
172 if (!mmio_resource_enabled(pdev, 0)) 172 if (!mmio_resource_enabled(pdev, 0))
173 return; 173 return;
174 174
175 base = ioremap_nocache(pci_resource_start(pdev, 0), 175 base = pci_ioremap_bar(pdev, 0);
176 pci_resource_len(pdev, 0)); 176 if (base == NULL)
177 if (base == NULL) return; 177 return;
178 178
179/* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */ 179/* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */
180#ifndef __hppa__ 180#ifndef __hppa__
@@ -221,9 +221,9 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
221 if (!mmio_resource_enabled(pdev, 0)) 221 if (!mmio_resource_enabled(pdev, 0))
222 return; 222 return;
223 223
224 base = ioremap_nocache(pci_resource_start(pdev, 0), 224 base = pci_ioremap_bar(pdev, 0);
225 pci_resource_len(pdev, 0)); 225 if (base == NULL)
226 if (base == NULL) return; 226 return;
227 227
228 cap_length = readb(base); 228 cap_length = readb(base);
229 op_reg_base = base + cap_length; 229 op_reg_base = base + cap_length;