Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 256a5435 authored by Kevin Hilman's avatar Kevin Hilman Committed by Rafael J. Wysocki
Browse files

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: default avatarKevin Hilman <khilman@ti.com>
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
parent f3393b62
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -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);
@@ -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
	}
};