]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/exynos/decon: fix disable clocks order
authorAndrzej Hajda <a.hajda@samsung.com>
Thu, 11 Feb 2016 11:25:04 +0000 (12:25 +0100)
committerInki Dae <daeinki@gmail.com>
Mon, 15 Feb 2016 14:25:23 +0000 (23:25 +0900)
Decon requires that clocks should be disabled in reverse order. Otherwise
system hangs.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos5433_drm_decon.c

index 107224a61eb3993e51cd7244e656bc4b7b529a8d..162ab93e99cb519e20963066c2285d50b6f08b88 100644 (file)
@@ -580,9 +580,9 @@ out:
 static int exynos5433_decon_suspend(struct device *dev)
 {
        struct decon_context *ctx = dev_get_drvdata(dev);
-       int i;
+       int i = ARRAY_SIZE(decon_clks_name);
 
-       for (i = 0; i < ARRAY_SIZE(decon_clks_name); i++)
+       while (--i >= 0)
                clk_disable_unprepare(ctx->clks[i]);
 
        return 0;