[COMMON] i2c: s3c2410: Use SET_NOIRQ_SYSTEM_SLEEP_PM_OPS instead of open-coded
authorYoungmin Nam <youngmin.nam@samsung.com>
Wed, 12 Apr 2017 16:26:47 +0000 (01:26 +0900)
committermyung-su.cha <myung-su.cha@samsung.com>
Thu, 10 May 2018 04:41:00 +0000 (13:41 +0900)
This patch came from f6903783eba49a2cbb6798b35fcf9d2ce61768b9 in android 4.9

Change-Id: I884ec7e3d58985aa4bb6a7e81539f986ea90b329
Signed-off-by: Youngmin Nam <youngmin.nam@samsung.com>
drivers/i2c/busses/i2c-s3c2410.c

index 082418f56150ac19a533136928ed8742785f5efa..9c8274c86981eff092f3b88bc685da483688673b 100644 (file)
@@ -1359,13 +1359,9 @@ static int s3c24xx_i2c_runtime_resume(struct device *dev)
 
 #ifdef CONFIG_PM
 static const struct dev_pm_ops s3c24xx_i2c_dev_pm_ops = {
-#ifdef CONFIG_PM_SLEEP
-       .suspend_noirq = s3c24xx_i2c_suspend_noirq,
-       .resume_noirq = s3c24xx_i2c_resume_noirq,
-#endif
-#ifdef CONFIG_PM
+       SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(s3c24xx_i2c_suspend_noirq,
+                                     s3c24xx_i2c_resume_noirq)
        .runtime_resume = s3c24xx_i2c_runtime_resume,
-#endif
 };
 
 #define S3C24XX_DEV_PM_OPS (&s3c24xx_i2c_dev_pm_ops)