USB: xhci-hcd: Add get_resuming_ports method

This patch adds support for the new get_resuming_ports HCD method to
the xhci-hcd driver.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Alan Stern
2018-06-08 16:59:57 -04:00
committed by Greg Kroah-Hartman
parent 00d423c8d0
commit 8f9cc83c06
3 changed files with 14 additions and 0 deletions

View File

@@ -1684,4 +1684,15 @@ int xhci_bus_resume(struct usb_hcd *hcd)
return 0;
}
unsigned long xhci_get_resuming_ports(struct usb_hcd *hcd)
{
struct xhci_hcd *xhci = hcd_to_xhci(hcd);
struct xhci_bus_state *bus_state;
bus_state = &xhci->bus_state[hcd_index(hcd)];
/* USB3 port wakeups are reported via usb_wakeup_notification() */
return bus_state->resuming_ports; /* USB2 ports only */
}
#endif /* CONFIG_PM */