Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / Domains: Fix build for CONFIG_PM_RUNTIME unset
This commit is contained in:
commit
b4fd4ae6c6
3 changed files with 26 additions and 18 deletions
|
@ -460,6 +460,21 @@ static int pm_genpd_runtime_resume(struct device *dev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pm_genpd_poweroff_unused - Power off all PM domains with no devices in use.
|
||||||
|
*/
|
||||||
|
void pm_genpd_poweroff_unused(void)
|
||||||
|
{
|
||||||
|
struct generic_pm_domain *genpd;
|
||||||
|
|
||||||
|
mutex_lock(&gpd_list_lock);
|
||||||
|
|
||||||
|
list_for_each_entry(genpd, &gpd_list, gpd_list_node)
|
||||||
|
genpd_queue_power_off_work(genpd);
|
||||||
|
|
||||||
|
mutex_unlock(&gpd_list_lock);
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static inline void genpd_power_off_work_fn(struct work_struct *work) {}
|
static inline void genpd_power_off_work_fn(struct work_struct *work) {}
|
||||||
|
@ -1255,18 +1270,3 @@ void pm_genpd_init(struct generic_pm_domain *genpd,
|
||||||
list_add(&genpd->gpd_list_node, &gpd_list);
|
list_add(&genpd->gpd_list_node, &gpd_list);
|
||||||
mutex_unlock(&gpd_list_lock);
|
mutex_unlock(&gpd_list_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* pm_genpd_poweroff_unused - Power off all PM domains with no devices in use.
|
|
||||||
*/
|
|
||||||
void pm_genpd_poweroff_unused(void)
|
|
||||||
{
|
|
||||||
struct generic_pm_domain *genpd;
|
|
||||||
|
|
||||||
mutex_lock(&gpd_list_lock);
|
|
||||||
|
|
||||||
list_for_each_entry(genpd, &gpd_list, gpd_list_node)
|
|
||||||
genpd_queue_power_off_work(genpd);
|
|
||||||
|
|
||||||
mutex_unlock(&gpd_list_lock);
|
|
||||||
}
|
|
||||||
|
|
|
@ -72,8 +72,6 @@ extern int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd,
|
||||||
extern void pm_genpd_init(struct generic_pm_domain *genpd,
|
extern void pm_genpd_init(struct generic_pm_domain *genpd,
|
||||||
struct dev_power_governor *gov, bool is_off);
|
struct dev_power_governor *gov, bool is_off);
|
||||||
extern int pm_genpd_poweron(struct generic_pm_domain *genpd);
|
extern int pm_genpd_poweron(struct generic_pm_domain *genpd);
|
||||||
extern void pm_genpd_poweroff_unused(void);
|
|
||||||
extern void genpd_queue_power_off_work(struct generic_pm_domain *genpd);
|
|
||||||
#else
|
#else
|
||||||
static inline int pm_genpd_add_device(struct generic_pm_domain *genpd,
|
static inline int pm_genpd_add_device(struct generic_pm_domain *genpd,
|
||||||
struct device *dev)
|
struct device *dev)
|
||||||
|
@ -101,8 +99,14 @@ static inline int pm_genpd_poweron(struct generic_pm_domain *genpd)
|
||||||
{
|
{
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
static inline void pm_genpd_poweroff_unused(void) {}
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_PM_GENERIC_DOMAINS_RUNTIME
|
||||||
|
extern void genpd_queue_power_off_work(struct generic_pm_domain *genpd);
|
||||||
|
extern void pm_genpd_poweroff_unused(void);
|
||||||
|
#else
|
||||||
static inline void genpd_queue_power_off_work(struct generic_pm_domain *gpd) {}
|
static inline void genpd_queue_power_off_work(struct generic_pm_domain *gpd) {}
|
||||||
|
static inline void pm_genpd_poweroff_unused(void) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _LINUX_PM_DOMAIN_H */
|
#endif /* _LINUX_PM_DOMAIN_H */
|
||||||
|
|
|
@ -231,3 +231,7 @@ config PM_CLK
|
||||||
config PM_GENERIC_DOMAINS
|
config PM_GENERIC_DOMAINS
|
||||||
bool
|
bool
|
||||||
depends on PM
|
depends on PM
|
||||||
|
|
||||||
|
config PM_GENERIC_DOMAINS_RUNTIME
|
||||||
|
def_bool y
|
||||||
|
depends on PM_RUNTIME && PM_GENERIC_DOMAINS
|
||||||
|
|
Loading…
Reference in a new issue