summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/tusb6010.c
diff options
context:
space:
mode:
authorFelipe Balbi2014-04-16 23:05:17 +0200
committerFelipe Balbi2014-04-21 21:07:25 +0200
commite741e637a85a802a93125dca1ecf324bc414101b (patch)
tree24fb14f9c8fd5b922e8008fef852c2b420749f6d /drivers/usb/musb/tusb6010.c
parentusb: phy: rename <linux/usb/usb_phy_gen_xceiv.h> to <linux/usb/usb_phy_generi... (diff)
downloadkernel-qcow2-linux-e741e637a85a802a93125dca1ecf324bc414101b.tar.gz
kernel-qcow2-linux-e741e637a85a802a93125dca1ecf324bc414101b.tar.xz
kernel-qcow2-linux-e741e637a85a802a93125dca1ecf324bc414101b.zip
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;