aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-omap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-omap.c')
-rw-r--r--drivers/i2c/busses/i2c-omap.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index b1086bfb0465..cd9c65f3d404 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1500,8 +1500,7 @@ static int omap_i2c_remove(struct platform_device *pdev)
1500 return 0; 1500 return 0;
1501} 1501}
1502 1502
1503#ifdef CONFIG_PM 1503static int __maybe_unused omap_i2c_runtime_suspend(struct device *dev)
1504static int omap_i2c_runtime_suspend(struct device *dev)
1505{ 1504{
1506 struct omap_i2c_dev *omap = dev_get_drvdata(dev); 1505 struct omap_i2c_dev *omap = dev_get_drvdata(dev);
1507 1506
@@ -1527,7 +1526,7 @@ static int omap_i2c_runtime_suspend(struct device *dev)
1527 return 0; 1526 return 0;
1528} 1527}
1529 1528
1530static int omap_i2c_runtime_resume(struct device *dev) 1529static int __maybe_unused omap_i2c_runtime_resume(struct device *dev)
1531{ 1530{
1532 struct omap_i2c_dev *omap = dev_get_drvdata(dev); 1531 struct omap_i2c_dev *omap = dev_get_drvdata(dev);
1533 1532
@@ -1542,20 +1541,18 @@ static int omap_i2c_runtime_resume(struct device *dev)
1542} 1541}
1543 1542
1544static const struct dev_pm_ops omap_i2c_pm_ops = { 1543static const struct dev_pm_ops omap_i2c_pm_ops = {
1544 SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
1545 pm_runtime_force_resume)
1545 SET_RUNTIME_PM_OPS(omap_i2c_runtime_suspend, 1546 SET_RUNTIME_PM_OPS(omap_i2c_runtime_suspend,
1546 omap_i2c_runtime_resume, NULL) 1547 omap_i2c_runtime_resume, NULL)
1547}; 1548};
1548#define OMAP_I2C_PM_OPS (&omap_i2c_pm_ops)
1549#else
1550#define OMAP_I2C_PM_OPS NULL
1551#endif /* CONFIG_PM */
1552 1549
1553static struct platform_driver omap_i2c_driver = { 1550static struct platform_driver omap_i2c_driver = {
1554 .probe = omap_i2c_probe, 1551 .probe = omap_i2c_probe,
1555 .remove = omap_i2c_remove, 1552 .remove = omap_i2c_remove,
1556 .driver = { 1553 .driver = {
1557 .name = "omap_i2c", 1554 .name = "omap_i2c",
1558 .pm = OMAP_I2C_PM_OPS, 1555 .pm = &omap_i2c_pm_ops,
1559 .of_match_table = of_match_ptr(omap_i2c_of_match), 1556 .of_match_table = of_match_ptr(omap_i2c_of_match),
1560 }, 1557 },
1561}; 1558};