Skip to content

Commit

Permalink
OMAP: PM: omap_device: conditionally use PM domain runtime helpers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kevin Hilman authored and Rafael J. Wysocki committed Jul 12, 2011
1 parent f3393b6 commit 256a543
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions arch/arm/plat-omap/omap_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ int omap_early_device_register(struct omap_device *od)
return 0;
}

#ifdef CONFIG_PM_RUNTIME
static int _od_runtime_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
Expand All @@ -563,12 +564,12 @@ static int _od_runtime_resume(struct device *dev)

return pm_generic_runtime_resume(dev);
}
#endif

static struct dev_pm_domain omap_device_pm_domain = {
.ops = {
.runtime_suspend = _od_runtime_suspend,
.runtime_idle = _od_runtime_idle,
.runtime_resume = _od_runtime_resume,
SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume,
_od_runtime_idle)
USE_PLATFORM_PM_SLEEP_OPS
}
};
Expand Down

0 comments on commit 256a543

Please sign in to comment.