summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ohci-hcd.c
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2012-10-08 17:11:28 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-22 22:23:59 +0400
commitd4ae47dc5670efecd2214110caf33dfc0ff7191f (patch)
tree644fbfdd28236f968b60a014af851a7612f335e5 /drivers/usb/host/ohci-hcd.c
parentcd1965db054eeace344487b9c8560439961f5f55 (diff)
downloadlinux-d4ae47dc5670efecd2214110caf33dfc0ff7191f.tar.xz
USB: ohci: remove check for RH already suspended in ohci_suspend
As suggested by Alan Stern, the code checking for the OHCI RH already suspended is no longer required since the bug it fixes has not been seen in ages. Remove that check making ohci_suspend much simpler. Signed-off-by: Florian Fainelli <florian@openwrt.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ohci-hcd.c')
-rw-r--r--drivers/usb/host/ohci-hcd.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 1382689b31db..76663295e1c7 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1017,26 +1017,19 @@ static int __maybe_unused ohci_suspend(struct usb_hcd *hcd, bool do_wakeup)
{
struct ohci_hcd *ohci = hcd_to_ohci (hcd);
unsigned long flags;
- int rc = 0;
- /* Root hub was already suspended. Disable irq emission and
- * mark HW unaccessible, bail out if RH has been resumed. Use
+ /* Disable irq emission and mark HW unaccessible. Use
* the spinlock to properly synchronize with possible pending
* RH suspend or resume activity.
*/
spin_lock_irqsave (&ohci->lock, flags);
- if (ohci->rh_state != OHCI_RH_SUSPENDED) {
- rc = -EINVAL;
- goto bail;
- }
ohci_writel(ohci, OHCI_INTR_MIE, &ohci->regs->intrdisable);
(void)ohci_readl(ohci, &ohci->regs->intrdisable);
clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
- bail:
spin_unlock_irqrestore (&ohci->lock, flags);
- return rc;
+ return 0;
}