From: myung-su.cha Date: Thu, 10 May 2018 04:57:43 +0000 (+0900) Subject: [COMMON] i2c: s3c2410: Fix build error related to idle ip for kernel 4.14 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4544c392088d54d8fbaa6d56f366f49fcf568935;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] i2c: s3c2410: Fix build error related to idle ip for kernel 4.14 Change-Id: Id3a2249cc53caef0608103039adf0ef6b90ba9da Signed-off-by: myung-su.cha --- 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);