diff mbox

[07/10] drm/exynos: Use devm_clk_get in exynos_drm_rotator.c

Message ID 1356338031-23674-8-git-send-email-sachin.kamat@linaro.org
State Accepted
Headers show

Commit Message

Sachin Kamat Dec. 24, 2012, 8:33 a.m. UTC
This eliminates the need for explicit clk_put and makes the
cleanup and exit path code simpler.

Cc: Eunchul Kim <chulspro.kim@samsung.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/gpu/drm/exynos/exynos_drm_rotator.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/exynos/exynos_drm_rotator.c b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
index 4505163..484c6bd 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_rotator.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_rotator.c
@@ -674,7 +674,7 @@  static int __devinit rotator_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	rot->clock = clk_get(dev, "rotator");
+	rot->clock = devm_clk_get(dev, "rotator");
 	if (IS_ERR_OR_NULL(rot->clock)) {
 		dev_err(dev, "failed to get clock\n");
 		ret = PTR_ERR(rot->clock);
@@ -712,7 +712,6 @@  static int __devinit rotator_probe(struct platform_device *pdev)
 err_ippdrv_register:
 	devm_kfree(dev, ippdrv->prop_list);
 	pm_runtime_disable(dev);
-	clk_put(rot->clock);
 err_clk_get:
 	free_irq(rot->irq, rot);
 	return ret;
@@ -728,7 +727,6 @@  static int __devexit rotator_remove(struct platform_device *pdev)
 	exynos_drm_ippdrv_unregister(ippdrv);
 
 	pm_runtime_disable(dev);
-	clk_put(rot->clock);
 
 	free_irq(rot->irq, rot);