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>
This commit is contained in:

committed by
Wolfram Sang

parent
d790aea70d
commit
5692d2a22e
@@ -1126,6 +1126,7 @@ static int __devexit omap_i2c_remove(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_PM
|
||||||
#ifdef CONFIG_PM_RUNTIME
|
#ifdef CONFIG_PM_RUNTIME
|
||||||
static int omap_i2c_runtime_suspend(struct device *dev)
|
static int omap_i2c_runtime_suspend(struct device *dev)
|
||||||
{
|
{
|
||||||
@@ -1174,15 +1175,16 @@ static int omap_i2c_runtime_resume(struct device *dev)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif /* CONFIG_PM_RUNTIME */
|
||||||
|
|
||||||
static struct dev_pm_ops omap_i2c_pm_ops = {
|
static struct dev_pm_ops omap_i2c_pm_ops = {
|
||||||
.runtime_suspend = omap_i2c_runtime_suspend,
|
SET_RUNTIME_PM_OPS(omap_i2c_runtime_suspend,
|
||||||
.runtime_resume = omap_i2c_runtime_resume,
|
omap_i2c_runtime_resume, NULL)
|
||||||
};
|
};
|
||||||
#define OMAP_I2C_PM_OPS (&omap_i2c_pm_ops)
|
#define OMAP_I2C_PM_OPS (&omap_i2c_pm_ops)
|
||||||
#else
|
#else
|
||||||
#define OMAP_I2C_PM_OPS NULL
|
#define OMAP_I2C_PM_OPS NULL
|
||||||
#endif
|
#endif /* CONFIG_PM */
|
||||||
|
|
||||||
static struct platform_driver omap_i2c_driver = {
|
static struct platform_driver omap_i2c_driver = {
|
||||||
.probe = omap_i2c_probe,
|
.probe = omap_i2c_probe,
|
||||||
|
Reference in New Issue
Block a user