diff options
Diffstat (limited to 'drivers/usb/host/ehci-msm.c')
-rw-r--r-- | drivers/usb/host/ehci-msm.c | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/drivers/usb/host/ehci-msm.c b/drivers/usb/host/ehci-msm.c index 9803a55fd5f4..17dd9e94001e 100644 --- a/drivers/usb/host/ehci-msm.c +++ b/drivers/usb/host/ehci-msm.c | |||
@@ -145,8 +145,8 @@ static int ehci_msm_probe(struct platform_device *pdev) | |||
145 | * powering up VBUS, mapping of registers address space and power | 145 | * powering up VBUS, mapping of registers address space and power |
146 | * management. | 146 | * management. |
147 | */ | 147 | */ |
148 | phy = usb_get_transceiver(); | 148 | phy = usb_get_phy(USB_PHY_TYPE_USB2); |
149 | if (!phy) { | 149 | if (IS_ERR_OR_NULL(phy)) { |
150 | dev_err(&pdev->dev, "unable to find transceiver\n"); | 150 | dev_err(&pdev->dev, "unable to find transceiver\n"); |
151 | ret = -ENODEV; | 151 | ret = -ENODEV; |
152 | goto unmap; | 152 | goto unmap; |
@@ -169,7 +169,7 @@ static int ehci_msm_probe(struct platform_device *pdev) | |||
169 | return 0; | 169 | return 0; |
170 | 170 | ||
171 | put_transceiver: | 171 | put_transceiver: |
172 | usb_put_transceiver(phy); | 172 | usb_put_phy(phy); |
173 | unmap: | 173 | unmap: |
174 | iounmap(hcd->regs); | 174 | iounmap(hcd->regs); |
175 | put_hcd: | 175 | put_hcd: |
@@ -187,7 +187,7 @@ static int __devexit ehci_msm_remove(struct platform_device *pdev) | |||
187 | pm_runtime_set_suspended(&pdev->dev); | 187 | pm_runtime_set_suspended(&pdev->dev); |
188 | 188 | ||
189 | otg_set_host(phy->otg, NULL); | 189 | otg_set_host(phy->otg, NULL); |
190 | usb_put_transceiver(phy); | 190 | usb_put_phy(phy); |
191 | 191 | ||
192 | usb_put_hcd(hcd); | 192 | usb_put_hcd(hcd); |
193 | 193 | ||
@@ -198,24 +198,11 @@ static int __devexit ehci_msm_remove(struct platform_device *pdev) | |||
198 | static int ehci_msm_pm_suspend(struct device *dev) | 198 | static int ehci_msm_pm_suspend(struct device *dev) |
199 | { | 199 | { |
200 | struct usb_hcd *hcd = dev_get_drvdata(dev); | 200 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
201 | bool wakeup = device_may_wakeup(dev); | 201 | bool do_wakeup = device_may_wakeup(dev); |
202 | 202 | ||
203 | dev_dbg(dev, "ehci-msm PM suspend\n"); | 203 | dev_dbg(dev, "ehci-msm PM suspend\n"); |
204 | 204 | ||
205 | /* | 205 | return ehci_suspend(hcd, do_wakeup); |
206 | * EHCI helper function has also the same check before manipulating | ||
207 | * port wakeup flags. We do check here the same condition before | ||
208 | * calling the same helper function to avoid bringing hardware | ||
209 | * from Low power mode when there is no need for adjusting port | ||
210 | * wakeup flags. | ||
211 | */ | ||
212 | if (hcd->self.root_hub->do_remote_wakeup && !wakeup) { | ||
213 | pm_runtime_resume(dev); | ||
214 | ehci_prepare_ports_for_controller_suspend(hcd_to_ehci(hcd), | ||
215 | wakeup); | ||
216 | } | ||
217 | |||
218 | return 0; | ||
219 | } | 206 | } |
220 | 207 | ||
221 | static int ehci_msm_pm_resume(struct device *dev) | 208 | static int ehci_msm_pm_resume(struct device *dev) |
@@ -223,7 +210,7 @@ static int ehci_msm_pm_resume(struct device *dev) | |||
223 | struct usb_hcd *hcd = dev_get_drvdata(dev); | 210 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
224 | 211 | ||
225 | dev_dbg(dev, "ehci-msm PM resume\n"); | 212 | dev_dbg(dev, "ehci-msm PM resume\n"); |
226 | ehci_prepare_ports_for_controller_resume(hcd_to_ehci(hcd)); | 213 | ehci_resume(hcd, false); |
227 | 214 | ||
228 | return 0; | 215 | return 0; |
229 | } | 216 | } |