summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorMajunath Goudar <csmanjuvijay@gmail.com>2013-11-13 17:40:21 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-08 17:53:18 -0800
commitd2e3d2b348bce1bb96cd42db51789f368c3eb974 (patch)
tree5f5ab6840ee8d346a036c661a819bbd5b2256bd0 /drivers/usb/host
parent14982e31da83a818d03748a89957e47c139d8f07 (diff)
downloadblackbird-op-linux-d2e3d2b348bce1bb96cd42db51789f368c3eb974.tar.gz
blackbird-op-linux-d2e3d2b348bce1bb96cd42db51789f368c3eb974.zip
USB: OHCI: Properly handle ohci-spear suspend
Suspend scenario in case of ohci-spear glue was not properly handled as it was not suspending generic part of ohci controller. Alan Stern suggested, properly handle ohci-spear suspend scenario. Calling explicitly the ohci_suspend() routine in spear_ohci_hcd_drv_suspend() will ensure proper handling of suspend scenario. Signed-off-by: Manjunath Goudar <csmanjuvijay@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: Arnd Bergmann <arnd@arndb.de> Cc: linux-usb@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ohci-spear.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/usb/host/ohci-spear.c b/drivers/usb/host/ohci-spear.c
index 6b02107d281d..e418c192e23a 100644
--- a/drivers/usb/host/ohci-spear.c
+++ b/drivers/usb/host/ohci-spear.c
@@ -129,20 +129,26 @@ static int spear_ohci_hcd_drv_remove(struct platform_device *pdev)
}
#if defined(CONFIG_PM)
-static int spear_ohci_hcd_drv_suspend(struct platform_device *dev,
+static int spear_ohci_hcd_drv_suspend(struct platform_device *pdev,
pm_message_t message)
{
- struct usb_hcd *hcd = platform_get_drvdata(dev);
+ struct usb_hcd *hcd = platform_get_drvdata(pdev);
struct ohci_hcd *ohci = hcd_to_ohci(hcd);
struct spear_ohci *sohci_p = to_spear_ohci(hcd);
+ bool do_wakeup = device_may_wakeup(&pdev->dev);
+ int ret;
if (time_before(jiffies, ohci->next_statechange))
msleep(5);
ohci->next_statechange = jiffies;
+ ret = ohci_suspend(hcd, do_wakeup);
+ if (ret)
+ return ret;
+
clk_disable_unprepare(sohci_p->clk);
- return 0;
+ return ret;
}
static int spear_ohci_hcd_drv_resume(struct platform_device *dev)
OpenPOWER on IntegriCloud