PM: Drop CONFIG_PM_RUNTIME from the driver core
After commit b2b49ccbdd
(PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
selected) PM_RUNTIME is always set if PM is set, so quite a few
depend on CONFIG_PM or even may be dropped entirely in some cases.
Replace CONFIG_PM_RUNTIME with CONFIG_PM in the PM core code.
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
@@ -280,8 +280,6 @@ int pm_genpd_name_poweron(const char *domain_name)
|
||||
return genpd ? pm_genpd_poweron(genpd) : -EINVAL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM_RUNTIME
|
||||
|
||||
static int genpd_start_dev_no_timing(struct generic_pm_domain *genpd,
|
||||
struct device *dev)
|
||||
{
|
||||
@@ -755,24 +753,6 @@ static int __init genpd_poweroff_unused(void)
|
||||
}
|
||||
late_initcall(genpd_poweroff_unused);
|
||||
|
||||
#else
|
||||
|
||||
static inline int genpd_dev_pm_qos_notifier(struct notifier_block *nb,
|
||||
unsigned long val, void *ptr)
|
||||
{
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
static inline void
|
||||
genpd_queue_power_off_work(struct generic_pm_domain *genpd) {}
|
||||
|
||||
static inline void genpd_power_off_work_fn(struct work_struct *work) {}
|
||||
|
||||
#define pm_genpd_runtime_suspend NULL
|
||||
#define pm_genpd_runtime_resume NULL
|
||||
|
||||
#endif /* CONFIG_PM_RUNTIME */
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
|
||||
/**
|
||||
@@ -1364,7 +1344,7 @@ void pm_genpd_syscore_poweron(struct device *dev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pm_genpd_syscore_poweron);
|
||||
|
||||
#else
|
||||
#else /* !CONFIG_PM_SLEEP */
|
||||
|
||||
#define pm_genpd_prepare NULL
|
||||
#define pm_genpd_suspend NULL
|
||||
@@ -2220,7 +2200,7 @@ int genpd_dev_pm_attach(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(genpd_dev_pm_attach);
|
||||
#endif
|
||||
#endif /* CONFIG_PM_GENERIC_DOMAINS_OF */
|
||||
|
||||
|
||||
/*** debugfs support ***/
|
||||
@@ -2236,10 +2216,8 @@ static struct dentry *pm_genpd_debugfs_dir;
|
||||
|
||||
/*
|
||||
* TODO: This function is a slightly modified version of rtpm_status_show
|
||||
* from sysfs.c, but dependencies between PM_GENERIC_DOMAINS and PM_RUNTIME
|
||||
* are too loose to generalize it.
|
||||
* from sysfs.c, so generalize it.
|
||||
*/
|
||||
#ifdef CONFIG_PM_RUNTIME
|
||||
static void rtpm_status_str(struct seq_file *s, struct device *dev)
|
||||
{
|
||||
static const char * const status_lookup[] = {
|
||||
@@ -2261,12 +2239,6 @@ static void rtpm_status_str(struct seq_file *s, struct device *dev)
|
||||
|
||||
seq_puts(s, p);
|
||||
}
|
||||
#else
|
||||
static void rtpm_status_str(struct seq_file *s, struct device *dev)
|
||||
{
|
||||
seq_puts(s, "active");
|
||||
}
|
||||
#endif
|
||||
|
||||
static int pm_genpd_summary_one(struct seq_file *s,
|
||||
struct generic_pm_domain *gpd)
|
||||
|
Reference in New Issue
Block a user