usb: phy: msm: Use usb_add_phy_dev() to register device
authorIvan T. Ivanov <iivanov@mm-sol.com>
Mon, 28 Apr 2014 13:34:23 +0000 (16:34 +0300)
committerFelipe Balbi <balbi@ti.com>
Wed, 30 Apr 2014 16:29:58 +0000 (11:29 -0500)
There could be more than one USB2.0 PHY's on the platform.
This will allow all of them to be registered successfully.

Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/phy/phy-msm-usb.c

index 8e7956eb8a7770d40a07fc162b65b2832bd3f950..9dc79180b9340d8d5e9d5e01062fc94afdf9d1ba 100644 (file)
@@ -1663,6 +1663,7 @@ static int msm_otg_probe(struct platform_device *pdev)
        phy->init = msm_phy_init;
        phy->set_power = msm_otg_set_power;
        phy->notify_disconnect = msm_phy_notify_disconnect;
+       phy->type = USB_PHY_TYPE_USB2;
 
        phy->io_ops = &msm_otg_io_ops;
 
@@ -1672,7 +1673,7 @@ static int msm_otg_probe(struct platform_device *pdev)
 
        msm_usb_reset(phy);
 
-       ret = usb_add_phy(&motg->phy, USB_PHY_TYPE_USB2);
+       ret = usb_add_phy_dev(&motg->phy);
        if (ret) {
                dev_err(&pdev->dev, "usb_add_phy failed\n");
                goto disable_ldo;