diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-11-05 09:33:38 +0100 |
---|---|---|
committer | Wolfram Sang <w.sang@pengutronix.de> | 2012-11-16 12:53:10 +0100 |
commit | 2935e0e05a3e348f046f1b485e933b85d1479aaa (patch) | |
tree | e450f43fa836cbd9f741946d6b8501777f6f0fde /drivers/i2c | |
parent | 9b7a0c40de6c5c04371f8cdb9153a0a5a0af5243 (diff) | |
download | talos-op-linux-2935e0e05a3e348f046f1b485e933b85d1479aaa.tar.gz talos-op-linux-2935e0e05a3e348f046f1b485e933b85d1479aaa.zip |
i2c: s3c2410: Refactor ifdefs for PM_SLEEP
Use the PM_SLEEP ifdef for system suspend and resume. This is partly
in preparation for adding runtime operations and partly because a user
may in theory choose to enable runtime suspend but not system suspend.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reviewed-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-s3c2410.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 3e0335f1fc60..f01cdf35f4c9 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -1118,7 +1118,7 @@ static int s3c24xx_i2c_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int s3c24xx_i2c_suspend_noirq(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -1141,10 +1141,14 @@ static int s3c24xx_i2c_resume(struct device *dev) return 0; } +#endif +#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 = s3c24xx_i2c_resume, +#endif }; #define S3C24XX_DEV_PM_OPS (&s3c24xx_i2c_dev_pm_ops) |