X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fusb%2Fhost%2Fpci-quirks.c;h=20861650905e63606955056b5169581a0b92463c;hb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;hp=1045f846fbe2c4cedb5d3ac498488b572246258a;hpb=16cf0ec7408f389279d413869e94c1a351392f97;p=linux-2.6.git diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index 1045f846f..208616509 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c @@ -8,7 +8,6 @@ * (and others) */ -#include #include #include #include @@ -168,8 +167,6 @@ 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; @@ -180,9 +177,10 @@ 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__ - control = readl(base + OHCI_CONTROL); +{ + u32 control = readl(base + OHCI_CONTROL); if (control & OHCI_CTRL_IR) { - wait_time = 500; /* arbitrary; 5 seconds */ + int wait_time = 500; /* arbitrary; 5 seconds */ writel(OHCI_INTR_OC, base + OHCI_INTRENABLE); writel(OHCI_OCR, base + OHCI_CMDSTATUS); while (wait_time > 0 && @@ -199,6 +197,7 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) /* reset controller, preserving RWC */ writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL); } +} #endif /*