aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/phy/phy-twl4030-usb.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c
index 7b04befd5271..c45a3aa4f2cc 100644
--- a/drivers/phy/phy-twl4030-usb.c
+++ b/drivers/phy/phy-twl4030-usb.c
@@ -644,7 +644,6 @@ static int twl4030_usb_probe(struct platform_device *pdev)
644 struct usb_otg *otg; 644 struct usb_otg *otg;
645 struct device_node *np = pdev->dev.of_node; 645 struct device_node *np = pdev->dev.of_node;
646 struct phy_provider *phy_provider; 646 struct phy_provider *phy_provider;
647 struct phy_init_data *init_data = NULL;
648 647
649 twl = devm_kzalloc(&pdev->dev, sizeof(*twl), GFP_KERNEL); 648 twl = devm_kzalloc(&pdev->dev, sizeof(*twl), GFP_KERNEL);
650 if (!twl) 649 if (!twl)
@@ -655,7 +654,6 @@ static int twl4030_usb_probe(struct platform_device *pdev)
655 (enum twl4030_usb_mode *)&twl->usb_mode); 654 (enum twl4030_usb_mode *)&twl->usb_mode);
656 else if (pdata) { 655 else if (pdata) {
657 twl->usb_mode = pdata->usb_mode; 656 twl->usb_mode = pdata->usb_mode;
658 init_data = pdata->init_data;
659 } else { 657 } else {
660 dev_err(&pdev->dev, "twl4030 initialized without pdata\n"); 658 dev_err(&pdev->dev, "twl4030 initialized without pdata\n");
661 return -EINVAL; 659 return -EINVAL;
@@ -680,7 +678,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
680 otg->set_host = twl4030_set_host; 678 otg->set_host = twl4030_set_host;
681 otg->set_peripheral = twl4030_set_peripheral; 679 otg->set_peripheral = twl4030_set_peripheral;
682 680
683 phy = devm_phy_create(twl->dev, NULL, &ops, init_data); 681 phy = devm_phy_create(twl->dev, NULL, &ops, NULL);
684 if (IS_ERR(phy)) { 682 if (IS_ERR(phy)) {
685 dev_dbg(&pdev->dev, "Failed to create PHY\n"); 683 dev_dbg(&pdev->dev, "Failed to create PHY\n");
686 return PTR_ERR(phy); 684 return PTR_ERR(phy);
@@ -733,6 +731,11 @@ static int twl4030_usb_probe(struct platform_device *pdev)
733 return status; 731 return status;
734 } 732 }
735 733
734 if (pdata)
735 err = phy_create_lookup(phy, "usb", "musb-hdrc.0");
736 if (err)
737 return err;
738
736 pm_runtime_mark_last_busy(&pdev->dev); 739 pm_runtime_mark_last_busy(&pdev->dev);
737 pm_runtime_put_autosuspend(twl->dev); 740 pm_runtime_put_autosuspend(twl->dev);
738 741