aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-platform.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-06-28 11:19:02 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-09 11:54:18 -0400
commitc5cf9212a368d88fe1e25797699b167f6daa64a5 (patch)
treecaaa246923f277de3a72e4d642f9fa914ba98a31 /drivers/usb/host/ehci-platform.c
parent336c5c310e8f0d5baba7973765339eaf5d989fe1 (diff)
EHCI: centralize controller suspend/resume
This patch (as1563) removes a lot of duplicated code by moving the EHCI controller suspend/resume routines into the core driver, where the various platform drivers can invoke them as needed. Not only does this simplify these platform drivers, this also makes it easier for other platform drivers to add suspend/resume support in the future. Note: The patch does not touch the ehci-fsl.c file, because its approach to suspend and resume is so different from all the others. It will have to be handled specially by its maintainer. 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-platform.c')
-rw-r--r--drivers/usb/host/ehci-platform.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index dfe881a34ae2..4b1d896d5a22 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -153,17 +153,16 @@ static int __devexit ehci_platform_remove(struct platform_device *dev)
153static int ehci_platform_suspend(struct device *dev) 153static int ehci_platform_suspend(struct device *dev)
154{ 154{
155 struct usb_hcd *hcd = dev_get_drvdata(dev); 155 struct usb_hcd *hcd = dev_get_drvdata(dev);
156 bool wakeup = device_may_wakeup(dev); 156 bool do_wakeup = device_may_wakeup(dev);
157 157
158 ehci_prepare_ports_for_controller_suspend(hcd_to_ehci(hcd), wakeup); 158 return ehci_suspend(hcd, do_wakeup);
159 return 0;
160} 159}
161 160
162static int ehci_platform_resume(struct device *dev) 161static int ehci_platform_resume(struct device *dev)
163{ 162{
164 struct usb_hcd *hcd = dev_get_drvdata(dev); 163 struct usb_hcd *hcd = dev_get_drvdata(dev);
165 164
166 ehci_prepare_ports_for_controller_resume(hcd_to_ehci(hcd)); 165 ehci_resume(hcd, false);
167 return 0; 166 return 0;
168} 167}
169 168