aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-12-24 14:03:51 +0530
committerInki Dae <inki.dae@samsung.com>2013-01-04 15:54:35 +0900
commit5cbd419cc533a821448fa47fc16f50990eef296f (patch)
treedd64eef88bff95917f76a636d58826bc6c7e8f23 /drivers
parenta8527cf5c344df60485e2c0a9196f0550550ae00 (diff)
downloadvexpress-lsk-5cbd419cc533a821448fa47fc16f50990eef296f.tar.gz
drm/exynos: Use devm_clk_get in exynos_drm_gsc.c
This eliminates the need for explicit clk_put and makes the cleanup and exit path code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_gsc.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gsc.c b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
index 04cc46c37c7..e8ebd6ea1cd 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_gsc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_gsc.c
@@ -1684,7 +1684,7 @@ static int __devinit gsc_probe(struct platform_device *pdev)
return -ENOMEM;
/* clock control */
- ctx->gsc_clk = clk_get(dev, "gscl");
+ ctx->gsc_clk = devm_clk_get(dev, "gscl");
if (IS_ERR(ctx->gsc_clk)) {
dev_err(dev, "failed to get gsc clock.\n");
return PTR_ERR(ctx->gsc_clk);
@@ -1695,16 +1695,14 @@ static int __devinit gsc_probe(struct platform_device *pdev)
ctx->regs = devm_request_and_ioremap(dev, ctx->regs_res);
if (!ctx->regs) {
dev_err(dev, "failed to map registers.\n");
- ret = -ENXIO;
- goto err_clk;
+ return -ENXIO;
}
/* resource irq */
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (!res) {
dev_err(dev, "failed to request irq resource.\n");
- ret = -ENOENT;
- goto err_clk;
+ return -ENOENT;
}
ctx->irq = res->start;
@@ -1712,7 +1710,7 @@ static int __devinit gsc_probe(struct platform_device *pdev)
IRQF_ONESHOT, "drm_gsc", ctx);
if (ret < 0) {
dev_err(dev, "failed to request irq.\n");
- goto err_clk;
+ return ret;
}
/* context initailization */
@@ -1756,8 +1754,6 @@ err_ippdrv_register:
pm_runtime_disable(dev);
err_get_irq:
free_irq(ctx->irq, ctx);
-err_clk:
- clk_put(ctx->gsc_clk);
return ret;
}
@@ -1775,7 +1771,6 @@ static int __devexit gsc_remove(struct platform_device *pdev)
pm_runtime_disable(dev);
free_irq(ctx->irq, ctx);
- clk_put(ctx->gsc_clk);
return 0;
}