]> git.karo-electronics.de Git - linux-beck.git/commitdiff
i2c: s3c2410: Use SET_NOIRQ_SYSTEM_SLEEP_PM_OPS instead of open-coded
authorAxel Lin <axel.lin@ingics.com>
Thu, 14 Apr 2016 01:08:55 +0000 (09:08 +0800)
committerWolfram Sang <wsa@the-dreams.de>
Sun, 24 Apr 2016 21:15:11 +0000 (23:15 +0200)
Use SET_NOIRQ_SYSTEM_SLEEP_PM_OPS to simplify the code.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-s3c2410.c

index 362a6de548336b0c35e39538fc1d3f2f8e01b5f8..1bc756313cb8e4de3e7021a2be1df7ec8ede0b7c 100644 (file)
@@ -1316,14 +1316,8 @@ static int s3c24xx_i2c_resume_noirq(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,
-       .freeze_noirq = s3c24xx_i2c_suspend_noirq,
-       .thaw_noirq = s3c24xx_i2c_resume_noirq,
-       .poweroff_noirq = s3c24xx_i2c_suspend_noirq,
-       .restore_noirq = s3c24xx_i2c_resume_noirq,
-#endif
+       SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(s3c24xx_i2c_suspend_noirq,
+                                     s3c24xx_i2c_resume_noirq)
 };
 
 #define S3C24XX_DEV_PM_OPS (&s3c24xx_i2c_dev_pm_ops)