aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2011-07-12 16:48:03 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2011-07-12 16:48:03 -0400
commit256a5435975e344b975f89c5434aa6f6eeb03fa1 (patch)
treef729de46947769d9cbf84eb5e98a6c6827a905d6
parentf3393b62f157cc87f8d78247e97b87778dc077b8 (diff)
OMAP: PM: omap_device: conditionally use PM domain runtime helpers
Only build and use the runtime PM helper functions only when runtime PM is actually enabled. Signed-off-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
-rw-r--r--arch/arm/plat-omap/omap_device.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index d21579b2c11e..f7d2ff77008a 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -537,6 +537,7 @@ int omap_early_device_register(struct omap_device *od)
537 return 0; 537 return 0;
538} 538}
539 539
540#ifdef CONFIG_PM_RUNTIME
540static int _od_runtime_suspend(struct device *dev) 541static int _od_runtime_suspend(struct device *dev)
541{ 542{
542 struct platform_device *pdev = to_platform_device(dev); 543 struct platform_device *pdev = to_platform_device(dev);
@@ -563,12 +564,12 @@ static int _od_runtime_resume(struct device *dev)
563 564
564 return pm_generic_runtime_resume(dev); 565 return pm_generic_runtime_resume(dev);
565} 566}
567#endif
566 568
567static struct dev_pm_domain omap_device_pm_domain = { 569static struct dev_pm_domain omap_device_pm_domain = {
568 .ops = { 570 .ops = {
569 .runtime_suspend = _od_runtime_suspend, 571 SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume,
570 .runtime_idle = _od_runtime_idle, 572 _od_runtime_idle)
571 .runtime_resume = _od_runtime_resume,
572 USE_PLATFORM_PM_SLEEP_OPS 573 USE_PLATFORM_PM_SLEEP_OPS
573 } 574 }
574}; 575};