[COMMON] i2c: s3c2410: Fix build error related to idle ip for kernel 4.14
authormyung-su.cha <myung-su.cha@samsung.com>
Thu, 10 May 2018 04:57:43 +0000 (13:57 +0900)
committerJaehyoung Choi <jkkkkk.choi@samsung.com>
Thu, 10 May 2018 07:24:01 +0000 (16:24 +0900)
Change-Id: Id3a2249cc53caef0608103039adf0ef6b90ba9da
Signed-off-by: myung-su.cha <myung-su.cha@samsung.com>
drivers/i2c/busses/i2c-s3c2410.c

index bba0e569aa4da0150705b34700ce24b732ad25ca..7a63a6a25a65385ebd0100e1a6fb7ffa4a4e2fb2 100644 (file)
@@ -38,7 +38,6 @@
 #include <asm/irq.h>
 
 #include <linux/platform_data/i2c-s3c2410.h>
-#include <soc/samsung/exynos-powermode.h>
 
 #ifdef CONFIG_CPU_IDLE
 #include <soc/samsung/exynos-pm.h>
@@ -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);