diff options
author | Felipe Balbi <balbi@ti.com> | 2014-04-16 16:05:17 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-04-21 14:07:25 -0500 |
commit | e741e637a85a802a93125dca1ecf324bc414101b (patch) | |
tree | 24fb14f9c8fd5b922e8008fef852c2b420749f6d /drivers/usb/musb/davinci.c | |
parent | d7078df6be6e9e5e3ac354859f5b8d60114391b4 (diff) | |
download | linux-e741e637a85a802a93125dca1ecf324bc414101b.tar.bz2 |
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/davinci.c')
-rw-r--r-- | drivers/usb/musb/davinci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c index 737035457858..de8492b06e46 100644 --- a/drivers/usb/musb/davinci.c +++ b/drivers/usb/musb/davinci.c @@ -381,7 +381,6 @@ static int davinci_musb_init(struct musb *musb) u32 revision; int ret = -ENODEV; - usb_phy_generic_register(); musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); if (IS_ERR_OR_NULL(musb->xceiv)) { ret = -EPROBE_DEFER; @@ -487,7 +486,6 @@ static int davinci_musb_exit(struct musb *musb) phy_off(); usb_put_phy(musb->xceiv); - usb_phy_generic_unregister(); return 0; } @@ -545,6 +543,7 @@ static int davinci_probe(struct platform_device *pdev) pdata->platform_ops = &davinci_ops; + usb_phy_generic_register(); platform_set_drvdata(pdev, glue); memset(musb_resources, 0x00, sizeof(*musb_resources) * @@ -603,6 +602,7 @@ static int davinci_remove(struct platform_device *pdev) struct davinci_glue *glue = platform_get_drvdata(pdev); platform_device_unregister(glue->musb); + usb_phy_generic_unregister(); clk_disable(glue->clk); clk_put(glue->clk); kfree(glue); |