aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-hub.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ohci-hub.c')
-rw-r--r--drivers/usb/host/ohci-hub.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
index 65cac8cc8921..4dd39022c388 100644
--- a/drivers/usb/host/ohci-hub.c
+++ b/drivers/usb/host/ohci-hub.c
@@ -284,7 +284,7 @@ static int ohci_bus_suspend (struct usb_hcd *hcd)
284 284
285 spin_lock_irq (&ohci->lock); 285 spin_lock_irq (&ohci->lock);
286 286
287 if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))) 287 if (unlikely(!HCD_HW_ACCESSIBLE(hcd)))
288 rc = -ESHUTDOWN; 288 rc = -ESHUTDOWN;
289 else 289 else
290 rc = ohci_rh_suspend (ohci, 0); 290 rc = ohci_rh_suspend (ohci, 0);
@@ -302,7 +302,7 @@ static int ohci_bus_resume (struct usb_hcd *hcd)
302 302
303 spin_lock_irq (&ohci->lock); 303 spin_lock_irq (&ohci->lock);
304 304
305 if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))) 305 if (unlikely(!HCD_HW_ACCESSIBLE(hcd)))
306 rc = -ESHUTDOWN; 306 rc = -ESHUTDOWN;
307 else 307 else
308 rc = ohci_rh_resume (ohci); 308 rc = ohci_rh_resume (ohci);
@@ -489,7 +489,7 @@ ohci_hub_status_data (struct usb_hcd *hcd, char *buf)
489 unsigned long flags; 489 unsigned long flags;
490 490
491 spin_lock_irqsave (&ohci->lock, flags); 491 spin_lock_irqsave (&ohci->lock, flags);
492 if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) 492 if (!HCD_HW_ACCESSIBLE(hcd))
493 goto done; 493 goto done;
494 494
495 /* undocumented erratum seen on at least rev D */ 495 /* undocumented erratum seen on at least rev D */
@@ -533,8 +533,12 @@ ohci_hub_status_data (struct usb_hcd *hcd, char *buf)
533 } 533 }
534 } 534 }
535 535
536 hcd->poll_rh = ohci_root_hub_state_changes(ohci, changed, 536 if (ohci_root_hub_state_changes(ohci, changed,
537 any_connected, rhsc_status); 537 any_connected, rhsc_status))
538 set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
539 else
540 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
541
538 542
539done: 543done:
540 spin_unlock_irqrestore (&ohci->lock, flags); 544 spin_unlock_irqrestore (&ohci->lock, flags);
@@ -701,7 +705,7 @@ static int ohci_hub_control (
701 u32 temp; 705 u32 temp;
702 int retval = 0; 706 int retval = 0;
703 707
704 if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))) 708 if (unlikely(!HCD_HW_ACCESSIBLE(hcd)))
705 return -ESHUTDOWN; 709 return -ESHUTDOWN;
706 710
707 switch (typeReq) { 711 switch (typeReq) {