Skip to content

Commit

Permalink
drm/exynos: Use devm_clk_get in exynos_drm_rotator.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sachin Kamat authored and Inki Dae committed Jan 4, 2013
1 parent df257a8 commit af8cd94
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/gpu/drm/exynos/exynos_drm_rotator.c
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,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);
Expand Down Expand Up @@ -713,7 +713,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;
Expand All @@ -729,7 +728,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);

Expand Down

0 comments on commit af8cd94

Please sign in to comment.