aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/chipidea/ci13xxx_imx.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/usb/chipidea/ci13xxx_imx.c b/drivers/usb/chipidea/ci13xxx_imx.c
index 5fac2a1b53e3..9cecfd517b78 100644
--- a/drivers/usb/chipidea/ci13xxx_imx.c
+++ b/drivers/usb/chipidea/ci13xxx_imx.c
@@ -99,7 +99,6 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
99{ 99{
100 struct ci13xxx_imx_data *data; 100 struct ci13xxx_imx_data *data;
101 struct platform_device *phy_pdev; 101 struct platform_device *phy_pdev;
102 struct device_node *phy_np;
103 struct resource *res; 102 struct resource *res;
104 int ret; 103 int ret;
105 104
@@ -133,10 +132,9 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
133 return ret; 132 return ret;
134 } 133 }
135 134
136 phy_np = of_parse_phandle(pdev->dev.of_node, "fsl,usbphy", 0); 135 data->phy_np = of_parse_phandle(pdev->dev.of_node, "fsl,usbphy", 0);
137 if (phy_np) { 136 if (data->phy_np) {
138 data->phy_np = phy_np; 137 phy_pdev = of_find_device_by_node(data->phy_np);
139 phy_pdev = of_find_device_by_node(phy_np);
140 if (phy_pdev) { 138 if (phy_pdev) {
141 struct usb_phy *phy; 139 struct usb_phy *phy;
142 phy = pdev_to_phy(phy_pdev); 140 phy = pdev_to_phy(phy_pdev);
@@ -211,8 +209,8 @@ err:
211 if (data->reg_vbus) 209 if (data->reg_vbus)
212 regulator_disable(data->reg_vbus); 210 regulator_disable(data->reg_vbus);
213put_np: 211put_np:
214 if (phy_np) 212 if (data->phy_np)
215 of_node_put(phy_np); 213 of_node_put(data->phy_np);
216 clk_disable_unprepare(data->clk); 214 clk_disable_unprepare(data->clk);
217 return ret; 215 return ret;
218} 216}