diff options
author | Shubhrajyoti D <shubhrajyoti@ti.com> | 2012-06-28 11:11:28 -0400 |
---|---|---|
committer | Wolfram Sang <w.sang@pengutronix.de> | 2012-07-12 08:18:26 -0400 |
commit | 5692d2a22ed9c1a1bc3030bd8188f335b1b0b58c (patch) | |
tree | d5aaf3a6a8b2607cd89bf1c8fe534b8b0cd5d5f7 /drivers/i2c | |
parent | d790aea70d714c1ba58823b4dc1b445f1e791072 (diff) |
i2c: omap: Use SET_RUNTIME_PM_OPS
Use SET_RUNTIME_PM_OPS macro to set runtime functions.
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-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-omap.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index b08607606014..b9915bb9343d 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c | |||
@@ -1126,6 +1126,7 @@ static int __devexit omap_i2c_remove(struct platform_device *pdev) | |||
1126 | return 0; | 1126 | return 0; |
1127 | } | 1127 | } |
1128 | 1128 | ||
1129 | #ifdef CONFIG_PM | ||
1129 | #ifdef CONFIG_PM_RUNTIME | 1130 | #ifdef CONFIG_PM_RUNTIME |
1130 | static int omap_i2c_runtime_suspend(struct device *dev) | 1131 | static int omap_i2c_runtime_suspend(struct device *dev) |
1131 | { | 1132 | { |
@@ -1174,15 +1175,16 @@ static int omap_i2c_runtime_resume(struct device *dev) | |||
1174 | 1175 | ||
1175 | return 0; | 1176 | return 0; |
1176 | } | 1177 | } |
1178 | #endif /* CONFIG_PM_RUNTIME */ | ||
1177 | 1179 | ||
1178 | static struct dev_pm_ops omap_i2c_pm_ops = { | 1180 | static struct dev_pm_ops omap_i2c_pm_ops = { |
1179 | .runtime_suspend = omap_i2c_runtime_suspend, | 1181 | SET_RUNTIME_PM_OPS(omap_i2c_runtime_suspend, |
1180 | .runtime_resume = omap_i2c_runtime_resume, | 1182 | omap_i2c_runtime_resume, NULL) |
1181 | }; | 1183 | }; |
1182 | #define OMAP_I2C_PM_OPS (&omap_i2c_pm_ops) | 1184 | #define OMAP_I2C_PM_OPS (&omap_i2c_pm_ops) |
1183 | #else | 1185 | #else |
1184 | #define OMAP_I2C_PM_OPS NULL | 1186 | #define OMAP_I2C_PM_OPS NULL |
1185 | #endif | 1187 | #endif /* CONFIG_PM */ |
1186 | 1188 | ||
1187 | static struct platform_driver omap_i2c_driver = { | 1189 | static struct platform_driver omap_i2c_driver = { |
1188 | .probe = omap_i2c_probe, | 1190 | .probe = omap_i2c_probe, |