drm/exynos: mic: use devm_clk interface
authorMarek Szyprowski <m.szyprowski@samsung.com>
Wed, 3 Feb 2016 12:42:48 +0000 (13:42 +0100)
committerInki Dae <daeinki@gmail.com>
Tue, 1 Mar 2016 14:37:10 +0000 (23:37 +0900)
Drivers should use devm_clk* interface instead of of_clk* functions.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_mic.c

index 4eaef36aec5a42d9d1ccd70ff4f15f39d707648c..10594c17097ae7de79ee87baaa97728a58114bf0 100644 (file)
@@ -445,7 +445,7 @@ int exynos_mic_probe(struct platform_device *pdev)
        }
 
        for (i = 0; i < NUM_CLKS; i++) {
-               mic->clks[i] = of_clk_get_by_name(dev->of_node, clk_names[i]);
+               mic->clks[i] = devm_clk_get(dev, clk_names[i]);
                if (IS_ERR(mic->clks[i])) {
                        DRM_ERROR("mic: Failed to get clock (%s)\n",
                                                                clk_names[i]);
@@ -463,13 +463,9 @@ err:
 static int exynos_mic_remove(struct platform_device *pdev)
 {
        struct exynos_mic *mic = platform_get_drvdata(pdev);
-       int i;
 
        drm_bridge_remove(&mic->bridge);
 
-       for (i = NUM_CLKS - 1; i > -1; i--)
-               clk_put(mic->clks[i]);
-
        return 0;
 }