aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-pxa27x.c
diff options
context:
space:
mode:
authorManjunath Goudar <manjunath.goudar@linaro.org>2013-10-04 00:28:15 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-05 20:56:41 -0400
commit4ceaa893be62921667bd30419e82bd74545cbc82 (patch)
treee8551ce4c1697b0cd5dcd28e416f698699b623b0 /drivers/usb/host/ohci-pxa27x.c
parent39dbd7df5632ac083caa01641cea831b1fe3a3ac (diff)
USB: OHCI: Properly handle ohci-pxa27x suspend
Suspend scenario in case of ohci-pxa27x glue was not properly handled as it was not suspending generic part of ohci controller. Alan Stern suggested, properly handle ohci-pxa27x suspend scenario. Calling explicitly the ohci_suspend() routine in ohci_hcd_pxa27x_drv_suspend() will ensure proper handling of suspend scenario. Signed-off-by: Manjunath Goudar <manjunath.goudar@linaro.org> Signed-off-by: Manjunath Goudar <csmanjuvijay@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ohci-pxa27x.c')
-rw-r--r--drivers/usb/host/ohci-pxa27x.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
index c1b1fa3047be..deea5d1d6394 100644
--- a/drivers/usb/host/ohci-pxa27x.c
+++ b/drivers/usb/host/ohci-pxa27x.c
@@ -509,13 +509,20 @@ static int ohci_hcd_pxa27x_drv_suspend(struct device *dev)
509 struct usb_hcd *hcd = dev_get_drvdata(dev); 509 struct usb_hcd *hcd = dev_get_drvdata(dev);
510 struct pxa27x_ohci *pxa_ohci = to_pxa27x_ohci(hcd); 510 struct pxa27x_ohci *pxa_ohci = to_pxa27x_ohci(hcd);
511 struct ohci_hcd *ohci = hcd_to_ohci(hcd); 511 struct ohci_hcd *ohci = hcd_to_ohci(hcd);
512 bool do_wakeup = device_may_wakeup(dev);
513 int ret;
514
512 515
513 if (time_before(jiffies, ohci->next_statechange)) 516 if (time_before(jiffies, ohci->next_statechange))
514 msleep(5); 517 msleep(5);
515 ohci->next_statechange = jiffies; 518 ohci->next_statechange = jiffies;
516 519
520 ret = ohci_suspend(hcd, do_wakeup);
521 if (ret)
522 return ret;
523
517 pxa27x_stop_hc(pxa_ohci, dev); 524 pxa27x_stop_hc(pxa_ohci, dev);
518 return 0; 525 return ret;
519} 526}
520 527
521static int ohci_hcd_pxa27x_drv_resume(struct device *dev) 528static int ohci_hcd_pxa27x_drv_resume(struct device *dev)