diff options
author | Vivek Gautam <gautam.vivek@samsung.com> | 2014-11-21 08:35:45 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-21 10:06:40 -0500 |
commit | c1a3acaadde7eb260f4fd4ec87cb87d3ffeed979 (patch) | |
tree | 42eb4cdfd4a894441a8a76d50c9d24a3b8c1d24a | |
parent | df9f7b311db1edae7ec5e2c78aa92fce7b9dd34d (diff) |
usb: dwc3: exynos: Remove local variable for clock from probe
There's no need to keep one local variable for clock, and
then assign the same to 'clk' member of dwc3_exynos.
Just cleaning it up.
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/dwc3/dwc3-exynos.c | 13 |
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) | |||
105 | static int dwc3_exynos_probe(struct platform_device *pdev) | 105 | static 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: | |||
184 | err3: | 181 | err3: |
185 | regulator_disable(exynos->vdd33); | 182 | regulator_disable(exynos->vdd33); |
186 | err2: | 183 | err2: |
187 | clk_disable_unprepare(clk); | 184 | clk_disable_unprepare(exynos->clk); |
188 | return ret; | 185 | return ret; |
189 | } | 186 | } |
190 | 187 | ||