summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-hub.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2016-01-25 15:45:38 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-03 13:14:52 -0800
commit8df0d77d8ce065ef536676fb4e1f36bfbf1dd809 (patch)
tree7bae7007a118271be114cddab692e94afffd3cc8 /drivers/usb/host/ehci-hub.c
parent87d61912c23a746ee9a8a8d2fe17af217c87f761 (diff)
USB: EHCI: improvements to unlink_empty_async_suspended()
unlink_empty_async_suspended() is marked __maybe_unused. This is because its caller, ehci_bus_suspend(), is protected by "#ifdef CONFIG_PM". We should use the same protection here instead of __maybe_unused. unlink_empty_async_suspended() gets called only when the root hub is suspended. It's silly for it to call start_iaa_cycle() at such a time; the IAA mechanism doesn't work when the root hub isn't running. It should call end_unlink_async() instead. But even this isn't necessary, since there already is a call to end_iaa_cycle() right before the call to unlink_empty_async_suspended(). All we have to do is interchange the two subroutine calls. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-hub.c')
-rw-r--r--drivers/usb/host/ehci-hub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index 6d84ce2edc27..6333d3c2be9c 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -347,9 +347,10 @@ static int ehci_bus_suspend (struct usb_hcd *hcd)
goto done;
ehci->rh_state = EHCI_RH_SUSPENDED;
+ unlink_empty_async_suspended(ehci);
+
/* Any IAA cycle that started before the suspend is now invalid */
end_iaa_cycle(ehci);
- unlink_empty_async_suspended(ehci);
ehci_handle_start_intr_unlinks(ehci);
ehci_handle_intr_unlinks(ehci);
end_free_itds(ehci);