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>
Šī revīzija ir iekļauta:
@@ -360,7 +360,6 @@ static int am35x_musb_init(struct musb *musb)
|
||||
if (!rev)
|
||||
return -ENODEV;
|
||||
|
||||
usb_phy_generic_register();
|
||||
musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2);
|
||||
if (IS_ERR_OR_NULL(musb->xceiv))
|
||||
return -EPROBE_DEFER;
|
||||
@@ -402,7 +401,6 @@ static int am35x_musb_exit(struct musb *musb)
|
||||
data->set_phy_power(0);
|
||||
|
||||
usb_put_phy(musb->xceiv);
|
||||
usb_phy_generic_unregister();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -505,6 +503,7 @@ static int am35x_probe(struct platform_device *pdev)
|
||||
|
||||
pdata->platform_ops = &am35x_ops;
|
||||
|
||||
usb_phy_generic_register();
|
||||
platform_set_drvdata(pdev, glue);
|
||||
|
||||
pinfo = am35x_dev_info;
|
||||
@@ -547,6 +546,7 @@ static int am35x_remove(struct platform_device *pdev)
|
||||
struct am35x_glue *glue = platform_get_drvdata(pdev);
|
||||
|
||||
platform_device_unregister(glue->musb);
|
||||
usb_phy_generic_unregister();
|
||||
clk_disable(glue->clk);
|
||||
clk_disable(glue->phy_clk);
|
||||
clk_put(glue->clk);
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user