From: Andrzej Hajda Date: Thu, 11 Feb 2016 11:25:04 +0000 (+0100) Subject: drm/exynos/decon: fix disable clocks order X-Git-Tag: v5.15~13916^2~27^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92c96ff82b69c0800e5404d9165a6d01d360a69a;p=platform%2Fkernel%2Flinux-starfive.git drm/exynos/decon: fix disable clocks order Decon requires that clocks should be disabled in reverse order. Otherwise system hangs. Signed-off-by: Andrzej Hajda Signed-off-by: Inki Dae --- diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index 107224a..162ab93 100644 --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c @@ -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;