diff options
-rw-r--r-- | drivers/i2c/busses/i2c-designware-platdrv.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index f72102f389c5..402ec3970fed 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c | |||
@@ -247,7 +247,7 @@ static const struct of_device_id dw_i2c_of_match[] = { | |||
247 | MODULE_DEVICE_TABLE(of, dw_i2c_of_match); | 247 | MODULE_DEVICE_TABLE(of, dw_i2c_of_match); |
248 | #endif | 248 | #endif |
249 | 249 | ||
250 | #ifdef CONFIG_PM_SLEEP | 250 | #ifdef CONFIG_PM |
251 | static int dw_i2c_suspend(struct device *dev) | 251 | static int dw_i2c_suspend(struct device *dev) |
252 | { | 252 | { |
253 | struct platform_device *pdev = to_platform_device(dev); | 253 | struct platform_device *pdev = to_platform_device(dev); |
@@ -269,13 +269,11 @@ static int dw_i2c_resume(struct device *dev) | |||
269 | 269 | ||
270 | return 0; | 270 | return 0; |
271 | } | 271 | } |
272 | |||
273 | static SIMPLE_DEV_PM_OPS(dw_i2c_dev_pm_ops, dw_i2c_suspend, dw_i2c_resume); | ||
274 | #define DW_I2C_DEV_PM_OPS (&dw_i2c_dev_pm_ops) | ||
275 | #else | ||
276 | #define DW_I2C_DEV_PM_OPS NULL | ||
277 | #endif | 272 | #endif |
278 | 273 | ||
274 | static UNIVERSAL_DEV_PM_OPS(dw_i2c_dev_pm_ops, dw_i2c_suspend, | ||
275 | dw_i2c_resume, NULL); | ||
276 | |||
279 | /* work with hotplug and coldplug */ | 277 | /* work with hotplug and coldplug */ |
280 | MODULE_ALIAS("platform:i2c_designware"); | 278 | MODULE_ALIAS("platform:i2c_designware"); |
281 | 279 | ||
@@ -287,7 +285,7 @@ static struct platform_driver dw_i2c_driver = { | |||
287 | .owner = THIS_MODULE, | 285 | .owner = THIS_MODULE, |
288 | .of_match_table = of_match_ptr(dw_i2c_of_match), | 286 | .of_match_table = of_match_ptr(dw_i2c_of_match), |
289 | .acpi_match_table = ACPI_PTR(dw_i2c_acpi_match), | 287 | .acpi_match_table = ACPI_PTR(dw_i2c_acpi_match), |
290 | .pm = DW_I2C_DEV_PM_OPS, | 288 | .pm = &dw_i2c_dev_pm_ops, |
291 | }, | 289 | }, |
292 | }; | 290 | }; |
293 | 291 | ||