]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
USB: ehci-hcd: Add get_resuming_ports method
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 8 Jun 2018 20:59:50 +0000 (16:59 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Jun 2018 13:44:43 +0000 (21:44 +0800)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-hub.c

index 89c47ae5c7d322c9581bcad1e5b1446e27569f1a..8608ac513fb764e4c8069cf870ecd1e12e068d1d 100644 (file)
@@ -1226,6 +1226,7 @@ static const struct hc_driver ehci_hc_driver = {
        .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 d7641cbdee43d64e5bfcaff7c0628988f3c370fc..ce0eaf7d7c12a11f1fd9fb0c76d7275613669bfb 100644 (file)
@@ -512,10 +512,18 @@ static int ehci_bus_resume (struct usb_hcd *hcd)
        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 */