From: Jung-Ick Guack Date: Fri, 1 Jul 2016 07:40:50 +0000 (+0900) Subject: [COMMON] i2c: exynos5: removed clk_unprepare during suspend X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b938856dd994ad8e30c01b83e7181ca4fa0663b1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] i2c: exynos5: removed clk_unprepare during suspend Fixed warning case during suspend. There is the case that is calling clk_unprepare even not called clk_disable during suspend_noirq. flow of warning case: exynos5_i2c_runtime_resume (clk_enable) -> exynos5_i2c_suspend_noirq (clk_unprepare) -> exynos5_i2c_runtime_suspend(clk_disable) Change-Id: I482c924a2440caa5407e4b6682b1f4fc10648dc5 Signed-off-by: Jung-Ick Guack --- diff --git a/drivers/i2c/busses/i2c-exynos5.c b/drivers/i2c/busses/i2c-exynos5.c index 6c9e4311caa8..9e07d783a258 100644 --- a/drivers/i2c/busses/i2c-exynos5.c +++ b/drivers/i2c/busses/i2c-exynos5.c @@ -1126,7 +1126,6 @@ static int exynos5_i2c_suspend_noirq(struct device *dev) i2c_lock_adapter(&i2c->adap); i2c->suspended = 1; - clk_unprepare(i2c->clk); i2c_unlock_adapter(&i2c->adap); return 0; @@ -1140,9 +1139,10 @@ static int exynos5_i2c_resume_noirq(struct device *dev) i2c_lock_adapter(&i2c->adap); exynos_update_ip_idle_status(i2c->idle_ip_index, 0); - ret = clk_prepare_enable(i2c->clk); + ret = clk_enable(i2c->clk); if (ret) { exynos_update_ip_idle_status(i2c->idle_ip_index, 1); + i2c_unlock_adapter(&i2c->adap); return ret; } exynos5_i2c_reset(i2c);