aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/dwc3-exynos.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/dwc3/dwc3-exynos.c')
-rw-r--r--drivers/usb/dwc3/dwc3-exynos.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c
index 4369c6658ec8..14f85a08a4cf 100644
--- a/drivers/usb/dwc3/dwc3-exynos.c
+++ b/drivers/usb/dwc3/dwc3-exynos.c
@@ -105,7 +105,6 @@ static int dwc3_exynos_remove_child(struct device *dev, void *unused)
105static int dwc3_exynos_probe(struct platform_device *pdev) 105static int dwc3_exynos_probe(struct platform_device *pdev)
106{ 106{
107 struct dwc3_exynos *exynos; 107 struct dwc3_exynos *exynos;
108 struct clk *clk;
109 struct device *dev = &pdev->dev; 108 struct device *dev = &pdev->dev;
110 struct device_node *node = dev->of_node; 109 struct device_node *node = dev->of_node;
111 110
@@ -132,15 +131,13 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
132 return ret; 131 return ret;
133 } 132 }
134 133
135 clk = devm_clk_get(dev, "usbdrd30"); 134 exynos->dev = dev;
136 if (IS_ERR(clk)) { 135
136 exynos->clk = devm_clk_get(dev, "usbdrd30");
137 if (IS_ERR(exynos->clk)) {
137 dev_err(dev, "couldn't get clock\n"); 138 dev_err(dev, "couldn't get clock\n");
138 return -EINVAL; 139 return -EINVAL;
139 } 140 }
140
141 exynos->dev = dev;
142 exynos->clk = clk;
143
144 clk_prepare_enable(exynos->clk); 141 clk_prepare_enable(exynos->clk);
145 142
146 exynos->vdd33 = devm_regulator_get(dev, "vdd33"); 143 exynos->vdd33 = devm_regulator_get(dev, "vdd33");
@@ -184,7 +181,7 @@ err4:
184err3: 181err3:
185 regulator_disable(exynos->vdd33); 182 regulator_disable(exynos->vdd33);
186err2: 183err2:
187 clk_disable_unprepare(clk); 184 clk_disable_unprepare(exynos->clk);
188 return ret; 185 return ret;
189} 186}
190 187