提交 0f1d6986 编写于 作者: R Rafael J. Wysocki

PM / Domains: Fix build for CONFIG_PM_SLEEP unset

Some callback functions defined in drivers/base/power/domain.c are
only necessary if CONFIG_PM_SLEEP is set and they call some other
functions that are only available in that case.  For this reason,
they should not be compiled at all when CONFIG_PM_SLEEP is not set.
Reported-by: NMagnus Damm <damm@opensource.se>
Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
上级 dae5cbc2
......@@ -1429,6 +1429,8 @@ static int pm_genpd_default_restore_state(struct device *dev)
return 0;
}
#ifdef CONFIG_PM_SLEEP
/**
* pm_genpd_default_suspend - Default "device suspend" for PM domians.
* @dev: Device to handle.
......@@ -1517,6 +1519,19 @@ static int pm_genpd_default_thaw(struct device *dev)
return cb ? cb(dev) : pm_generic_thaw(dev);
}
#else /* !CONFIG_PM_SLEEP */
#define pm_genpd_default_suspend NULL
#define pm_genpd_default_suspend_late NULL
#define pm_genpd_default_resume_early NULL
#define pm_genpd_default_resume NULL
#define pm_genpd_default_freeze NULL
#define pm_genpd_default_freeze_late NULL
#define pm_genpd_default_thaw_early NULL
#define pm_genpd_default_thaw NULL
#endif /* !CONFIG_PM_SLEEP */
/**
* pm_genpd_init - Initialize a generic I/O PM domain object.
* @genpd: PM domain object to initialize.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册