[2/3] USB: ehci-hcd: Add get_resuming_ports method
From: Alan Stern <stern@rowland.harvard.edu>
Date: 2018-06-08 20:59:50
This patch adds support for the new get_resuming_ports HCD method to the ehci-hcd driver. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> --- [as1868] -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: usb-4.x/drivers/usb/host/ehci-hcd.c ===================================================================
--- usb-4.x.orig/drivers/usb/host/ehci-hcd.c
+++ usb-4.x/drivers/usb/host/ehci-hcd.c@@ -1226,6 +1226,7 @@ static const struct hc_driver ehci_hc_dr .bus_resume = ehci_bus_resume, .relinquish_port = ehci_relinquish_port, .port_handed_over = ehci_port_handed_over, + .get_resuming_ports = ehci_get_resuming_ports, /* * device support
Index: usb-4.x/drivers/usb/host/ehci-hub.c ===================================================================
--- usb-4.x.orig/drivers/usb/host/ehci-hub.c
+++ usb-4.x/drivers/usb/host/ehci-hub.c@@ -512,10 +512,18 @@ static int ehci_bus_resume (struct usb_h return -ESHUTDOWN; } +static unsigned long ehci_get_resuming_ports(struct usb_hcd *hcd) +{ + struct ehci_hcd *ehci = hcd_to_ehci(hcd); + + return ehci->resuming_ports; +} + #else #define ehci_bus_suspend NULL #define ehci_bus_resume NULL +#define ehci_get_resuming_ports NULL #endif /* CONFIG_PM */