diff options
Diffstat (limited to 'drivers/usb/host/pci-quirks.c')
-rw-r--r-- | drivers/usb/host/pci-quirks.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index dff60568b4a1..20861650905e 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c | |||
@@ -167,8 +167,6 @@ static int __devinit mmio_resource_enabled(struct pci_dev *pdev, int idx) | |||
167 | static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) | 167 | static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) |
168 | { | 168 | { |
169 | void __iomem *base; | 169 | void __iomem *base; |
170 | int wait_time; | ||
171 | u32 control; | ||
172 | 170 | ||
173 | if (!mmio_resource_enabled(pdev, 0)) | 171 | if (!mmio_resource_enabled(pdev, 0)) |
174 | return; | 172 | return; |
@@ -179,9 +177,10 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) | |||
179 | 177 | ||
180 | /* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */ | 178 | /* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */ |
181 | #ifndef __hppa__ | 179 | #ifndef __hppa__ |
182 | control = readl(base + OHCI_CONTROL); | 180 | { |
181 | u32 control = readl(base + OHCI_CONTROL); | ||
183 | if (control & OHCI_CTRL_IR) { | 182 | if (control & OHCI_CTRL_IR) { |
184 | wait_time = 500; /* arbitrary; 5 seconds */ | 183 | int wait_time = 500; /* arbitrary; 5 seconds */ |
185 | writel(OHCI_INTR_OC, base + OHCI_INTRENABLE); | 184 | writel(OHCI_INTR_OC, base + OHCI_INTRENABLE); |
186 | writel(OHCI_OCR, base + OHCI_CMDSTATUS); | 185 | writel(OHCI_OCR, base + OHCI_CMDSTATUS); |
187 | while (wait_time > 0 && | 186 | while (wait_time > 0 && |
@@ -198,6 +197,7 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) | |||
198 | /* reset controller, preserving RWC */ | 197 | /* reset controller, preserving RWC */ |
199 | writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL); | 198 | writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL); |
200 | } | 199 | } |
200 | } | ||
201 | #endif | 201 | #endif |
202 | 202 | ||
203 | /* | 203 | /* |