summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/blackfin.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-04-16 16:05:17 -0500
committerFelipe Balbi <balbi@ti.com>2014-04-21 14:07:25 -0500
commite741e637a85a802a93125dca1ecf324bc414101b (patch)
tree24fb14f9c8fd5b922e8008fef852c2b420749f6d /drivers/usb/musb/blackfin.c
parentd7078df6be6e9e5e3ac354859f5b8d60114391b4 (diff)
downloadlinux-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/blackfin.c')
-rw-r--r--drivers/usb/musb/blackfin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c
index c9992a2eaaa8..53acffe9a858 100644
--- a/drivers/usb/musb/blackfin.c
+++ b/drivers/usb/musb/blackfin.c
@@ -401,7 +401,6 @@ static int bfin_musb_init(struct musb *musb)
}
gpio_direction_output(musb->config->gpio_vrsel, 0);
- usb_phy_generic_register();
musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2);
if (IS_ERR_OR_NULL(musb->xceiv)) {
gpio_free(musb->config->gpio_vrsel);
@@ -424,9 +423,8 @@ static int bfin_musb_init(struct musb *musb)
static int bfin_musb_exit(struct musb *musb)
{
gpio_free(musb->config->gpio_vrsel);
-
usb_put_phy(musb->xceiv);
- usb_phy_generic_unregister();
+
return 0;
}
@@ -477,6 +475,7 @@ static int bfin_probe(struct platform_device *pdev)
pdata->platform_ops = &bfin_ops;
+ usb_phy_generic_register();
platform_set_drvdata(pdev, glue);
memset(musb_resources, 0x00, sizeof(*musb_resources) *
@@ -528,6 +527,7 @@ static int bfin_remove(struct platform_device *pdev)
struct bfin_glue *glue = platform_get_drvdata(pdev);
platform_device_unregister(glue->musb);
+ usb_phy_generic_unregister();
kfree(glue);
return 0;