mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
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: Magnus Damm <damm@opensource.se> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
This commit is contained in:
parent
dae5cbc244
commit
0f1d6986ba
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user