diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-07-12 09:26:33 +0200 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2019-08-09 12:37:51 +0200 |
commit | 03bf32bbb607e07bf9ac6ea126088d1dc88ea948 (patch) | |
tree | 29c858cd27be121890293be9f6889cd9f3ba0c43 /drivers/usb/dwc3 | |
parent | usb: dwc3: remove generic PHYs forwarding for XHCI device (diff) | |
download | linux-03bf32bbb607e07bf9ac6ea126088d1dc88ea948.tar.xz linux-03bf32bbb607e07bf9ac6ea126088d1dc88ea948.zip |
usb: dwc3: Use devres to get clocks
Use devres to get clocks and drop explicit clock freeing. No
functional change intended.
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Chris Healy <cphealy@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/core.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index 252c397860ef..7ae2eee72f90 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c @@ -1448,7 +1448,7 @@ static int dwc3_probe(struct platform_device *pdev) if (dev->of_node) { dwc->num_clks = ARRAY_SIZE(dwc3_core_clks); - ret = clk_bulk_get(dev, dwc->num_clks, dwc->clks); + ret = devm_clk_bulk_get(dev, dwc->num_clks, dwc->clks); if (ret == -EPROBE_DEFER) return ret; /* @@ -1461,7 +1461,7 @@ static int dwc3_probe(struct platform_device *pdev) ret = reset_control_deassert(dwc->reset); if (ret) - goto put_clks; + return ret; ret = clk_bulk_prepare(dwc->num_clks, dwc->clks); if (ret) @@ -1548,8 +1548,6 @@ unprepare_clks: clk_bulk_unprepare(dwc->num_clks, dwc->clks); assert_reset: reset_control_assert(dwc->reset); -put_clks: - clk_bulk_put(dwc->num_clks, dwc->clks); return ret; } @@ -1572,7 +1570,6 @@ static int dwc3_remove(struct platform_device *pdev) dwc3_free_event_buffers(dwc); dwc3_free_scratch_buffers(dwc); - clk_bulk_put(dwc->num_clks, dwc->clks); return 0; } |