From 4544c392088d54d8fbaa6d56f366f49fcf568935 Mon Sep 17 00:00:00 2001 From: "myung-su.cha" Date: Thu, 10 May 2018 13:57:43 +0900 Subject: [PATCH] [COMMON] i2c: s3c2410: Fix build error related to idle ip for kernel 4.14 Change-Id: Id3a2249cc53caef0608103039adf0ef6b90ba9da Signed-off-by: myung-su.cha --- drivers/i2c/busses/i2c-s3c2410.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index bba0e569aa4d..7a63a6a25a65 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -38,7 +38,6 @@ #include #include -#include #ifdef CONFIG_CPU_IDLE #include @@ -849,7 +848,9 @@ static int s3c24xx_i2c_xfer(struct i2c_adapter *adap, int ret; pm_runtime_get_sync(&adap->dev); +#ifdef CONFIG_ARCH_EXYNOS_PM exynos_update_ip_idle_status(i2c->idle_ip_index, 0); +#endif ret = clk_enable(i2c->clk); if (ret) return ret; @@ -864,7 +865,9 @@ static int s3c24xx_i2c_xfer(struct i2c_adapter *adap, if (ret != -EAGAIN) { clk_disable(i2c->clk); +#ifdef CONFIG_ARCH_EXYNOS_PM exynos_update_ip_idle_status(i2c->idle_ip_index, 1); +#endif pm_runtime_put(&adap->dev); return ret; } @@ -875,7 +878,9 @@ static int s3c24xx_i2c_xfer(struct i2c_adapter *adap, } clk_disable(i2c->clk); +#ifdef CONFIG_ARCH_EXYNOS_PM exynos_update_ip_idle_status(i2c->idle_ip_index, 1); +#endif pm_runtime_put(&adap->dev); return -EREMOTEIO; } @@ -1195,7 +1200,9 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) i2c->adap.class = I2C_CLASS_DEPRECATED; i2c->tx_setup = 50; +#ifdef CONFIG_ARCH_EXYNOS_PM i2c->idle_ip_index = exynos_get_idle_ip_index(dev_name(&pdev->dev)); +#endif init_waitqueue_head(&i2c->wait); -- 2.20.1