summaryrefslogtreecommitdiff
path: root/drivers/usb/musb/tusb6010.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-04-17 01:05:17 +0400
committerFelipe Balbi <balbi@ti.com>2014-04-21 23:07:25 +0400
commite741e637a85a802a93125dca1ecf324bc414101b (patch)
tree24fb14f9c8fd5b922e8008fef852c2b420749f6d /drivers/usb/musb/tusb6010.c
parentd7078df6be6e9e5e3ac354859f5b8d60114391b4 (diff)
downloadlinux-e741e637a85a802a93125dca1ecf324bc414101b.tar.xz
usb: musb: move usb_phy_generic_{un,}register calls to probe()/remove()
This patch is in preparation to supporting calling those functions multiple times. Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/tusb6010.c')
-rw-r--r--drivers/usb/musb/tusb6010.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/musb/tusb6010.c b/drivers/usb/musb/tusb6010.c
index 8d4a8194c8f2..e1da199c6f21 100644
--- a/drivers/usb/musb/tusb6010.c
+++ b/drivers/usb/musb/tusb6010.c
@@ -1065,7 +1065,6 @@ static int tusb_musb_init(struct musb *musb)
void __iomem *sync = NULL;
int ret;
- usb_phy_generic_register();
musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2);
if (IS_ERR_OR_NULL(musb->xceiv))
return -EPROBE_DEFER;
@@ -1117,7 +1116,6 @@ done:
iounmap(sync);
usb_put_phy(musb->xceiv);
- usb_phy_generic_unregister();
}
return ret;
}
@@ -1133,7 +1131,6 @@ static int tusb_musb_exit(struct musb *musb)
iounmap(musb->sync_va);
usb_put_phy(musb->xceiv);
- usb_phy_generic_unregister();
return 0;
}
@@ -1176,6 +1173,7 @@ static int tusb_probe(struct platform_device *pdev)
pdata->platform_ops = &tusb_ops;
+ usb_phy_generic_register();
platform_set_drvdata(pdev, glue);
memset(musb_resources, 0x00, sizeof(*musb_resources) *
@@ -1224,6 +1222,7 @@ static int tusb_remove(struct platform_device *pdev)
struct tusb6010_glue *glue = platform_get_drvdata(pdev);
platform_device_unregister(glue->musb);
+ usb_phy_generic_unregister();
kfree(glue);
return 0;