aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-mv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-mv.c')
-rw-r--r--drivers/usb/host/ehci-mv.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/usb/host/ehci-mv.c b/drivers/usb/host/ehci-mv.c
index a936bbcff8f4..0e8c168ca24c 100644
--- a/drivers/usb/host/ehci-mv.c
+++ b/drivers/usb/host/ehci-mv.c
@@ -13,6 +13,7 @@
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/clk.h> 15#include <linux/clk.h>
16#include <linux/err.h>
16#include <linux/usb/otg.h> 17#include <linux/usb/otg.h>
17#include <linux/platform_data/mv_usb.h> 18#include <linux/platform_data/mv_usb.h>
18 19
@@ -253,8 +254,8 @@ static int mv_ehci_probe(struct platform_device *pdev)
253 ehci_mv->mode = pdata->mode; 254 ehci_mv->mode = pdata->mode;
254 if (ehci_mv->mode == MV_USB_MODE_OTG) { 255 if (ehci_mv->mode == MV_USB_MODE_OTG) {
255#ifdef CONFIG_USB_OTG_UTILS 256#ifdef CONFIG_USB_OTG_UTILS
256 ehci_mv->otg = usb_get_transceiver(); 257 ehci_mv->otg = usb_get_phy(USB_PHY_TYPE_USB2);
257 if (!ehci_mv->otg) { 258 if (IS_ERR_OR_NULL(ehci_mv->otg)) {
258 dev_err(&pdev->dev, 259 dev_err(&pdev->dev,
259 "unable to find transceiver\n"); 260 "unable to find transceiver\n");
260 retval = -ENODEV; 261 retval = -ENODEV;
@@ -302,8 +303,8 @@ err_set_vbus:
302 pdata->set_vbus(0); 303 pdata->set_vbus(0);
303#ifdef CONFIG_USB_OTG_UTILS 304#ifdef CONFIG_USB_OTG_UTILS
304err_put_transceiver: 305err_put_transceiver:
305 if (ehci_mv->otg) 306 if (!IS_ERR_OR_NULL(ehci_mv->otg))
306 usb_put_transceiver(ehci_mv->otg); 307 usb_put_phy(ehci_mv->otg);
307#endif 308#endif
308err_disable_clk: 309err_disable_clk:
309 mv_ehci_disable(ehci_mv); 310 mv_ehci_disable(ehci_mv);
@@ -331,9 +332,9 @@ static int mv_ehci_remove(struct platform_device *pdev)
331 if (hcd->rh_registered) 332 if (hcd->rh_registered)
332 usb_remove_hcd(hcd); 333 usb_remove_hcd(hcd);
333 334
334 if (ehci_mv->otg) { 335 if (!IS_ERR_OR_NULL(ehci_mv->otg)) {
335 otg_set_host(ehci_mv->otg->otg, NULL); 336 otg_set_host(ehci_mv->otg->otg, NULL);
336 usb_put_transceiver(ehci_mv->otg); 337 usb_put_phy(ehci_mv->otg);
337 } 338 }
338 339
339 if (ehci_mv->mode == MV_USB_MODE_HOST) { 340 if (ehci_mv->mode == MV_USB_MODE_HOST) {