summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorVivek Gautam <gautam.vivek@samsung.com>2014-11-21 19:05:45 +0530
committerFelipe Balbi <balbi@ti.com>2014-11-21 09:06:40 -0600
commitc1a3acaadde7eb260f4fd4ec87cb87d3ffeed979 (patch)
tree42eb4cdfd4a894441a8a76d50c9d24a3b8c1d24a /drivers/usb/dwc3
parentdf9f7b311db1edae7ec5e2c78aa92fce7b9dd34d (diff)
downloadlinux-c1a3acaadde7eb260f4fd4ec87cb87d3ffeed979.tar.bz2
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>
Diffstat (limited to 'drivers/usb/dwc3')
-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)
static int dwc3_exynos_probe(struct platform_device *pdev)
{
struct dwc3_exynos *exynos;
- struct clk *clk;
struct device *dev = &pdev->dev;
struct device_node *node = dev->of_node;
@@ -132,15 +131,13 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
return ret;
}
- clk = devm_clk_get(dev, "usbdrd30");
- if (IS_ERR(clk)) {
+ exynos->dev = dev;
+
+ exynos->clk = devm_clk_get(dev, "usbdrd30");
+ if (IS_ERR(exynos->clk)) {
dev_err(dev, "couldn't get clock\n");
return -EINVAL;
}
-
- exynos->dev = dev;
- exynos->clk = clk;
-
clk_prepare_enable(exynos->clk);
exynos->vdd33 = devm_regulator_get(dev, "vdd33");
@@ -184,7 +181,7 @@ err4:
err3:
regulator_disable(exynos->vdd33);
err2:
- clk_disable_unprepare(clk);
+ clk_disable_unprepare(exynos->clk);
return ret;
}