diff options
| -rw-r--r-- | drivers/usb/host/ohci-spear.c | 12 |
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) | |||
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | #if defined(CONFIG_PM) | 131 | #if defined(CONFIG_PM) |
| 132 | static int spear_ohci_hcd_drv_suspend(struct platform_device *dev, | 132 | static int spear_ohci_hcd_drv_suspend(struct platform_device *pdev, |
| 133 | pm_message_t message) | 133 | pm_message_t message) |
| 134 | { | 134 | { |
| 135 | struct usb_hcd *hcd = platform_get_drvdata(dev); | 135 | struct usb_hcd *hcd = platform_get_drvdata(pdev); |
| 136 | struct ohci_hcd *ohci = hcd_to_ohci(hcd); | 136 | struct ohci_hcd *ohci = hcd_to_ohci(hcd); |
| 137 | struct spear_ohci *sohci_p = to_spear_ohci(hcd); | 137 | struct spear_ohci *sohci_p = to_spear_ohci(hcd); |
| 138 | bool do_wakeup = device_may_wakeup(&pdev->dev); | ||
| 139 | int ret; | ||
| 138 | 140 | ||
| 139 | if (time_before(jiffies, ohci->next_statechange)) | 141 | if (time_before(jiffies, ohci->next_statechange)) |
| 140 | msleep(5); | 142 | msleep(5); |
| 141 | ohci->next_statechange = jiffies; | 143 | ohci->next_statechange = jiffies; |
| 142 | 144 | ||
| 145 | ret = ohci_suspend(hcd, do_wakeup); | ||
| 146 | if (ret) | ||
| 147 | return ret; | ||
| 148 | |||
| 143 | clk_disable_unprepare(sohci_p->clk); | 149 | clk_disable_unprepare(sohci_p->clk); |
| 144 | 150 | ||
| 145 | return 0; | 151 | return ret; |
| 146 | } | 152 | } |
| 147 | 153 | ||
| 148 | static int spear_ohci_hcd_drv_resume(struct platform_device *dev) | 154 | static int spear_ohci_hcd_drv_resume(struct platform_device *dev) |
