linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / usb / host / pci-quirks.c
index 2086165..9e81c26 100644 (file)
@@ -8,13 +8,13 @@
  *  (and others)
  */
 
+#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/acpi.h>
-#include "pci-quirks.h"
 
 
 #define UHCI_USBLEGSUP         0xc0            /* legacy support */
@@ -167,6 +167,8 @@ static int __devinit mmio_resource_enabled(struct pci_dev *pdev, int idx)
 static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
 {
        void __iomem *base;
+       int wait_time;
+       u32 control;
 
        if (!mmio_resource_enabled(pdev, 0))
                return;
@@ -177,10 +179,9 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
 
 /* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */
 #ifndef __hppa__
-{
-       u32 control = readl(base + OHCI_CONTROL);
+       control = readl(base + OHCI_CONTROL);
        if (control & OHCI_CTRL_IR) {
-               int wait_time = 500; /* arbitrary; 5 seconds */
+               wait_time = 500; /* arbitrary; 5 seconds */
                writel(OHCI_INTR_OC, base + OHCI_INTRENABLE);
                writel(OHCI_OCR, base + OHCI_CMDSTATUS);
                while (wait_time > 0 &&
@@ -197,7 +198,6 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
                /* reset controller, preserving RWC */
                writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL);
        }
-}
 #endif
 
        /*