aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/power/domain.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-11-27 16:38:05 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-12-03 18:46:58 -0500
commitd30d819dc83107812d9b2876e5e7194e511ed6af (patch)
tree0c889e71575dca8d9caa26c89cd9ec741632c4fd /drivers/base/power/domain.c
parentef9cc993cd2e3524d86e86e9ad510e8f34b9c078 (diff)
PM: Drop CONFIG_PM_RUNTIME from the driver core
After commit b2b49ccbdd54 (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>
Diffstat (limited to 'drivers/base/power/domain.c')
-rw-r--r--drivers/base/power/domain.c34
1 files changed, 3 insertions, 31 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index fb83d4acd400..7c5c7410d76c 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -280,8 +280,6 @@ int pm_genpd_name_poweron(const char *domain_name)
280 return genpd ? pm_genpd_poweron(genpd) : -EINVAL; 280 return genpd ? pm_genpd_poweron(genpd) : -EINVAL;
281} 281}
282 282
283#ifdef CONFIG_PM_RUNTIME
284
285static int genpd_start_dev_no_timing(struct generic_pm_domain *genpd, 283static int genpd_start_dev_no_timing(struct generic_pm_domain *genpd,
286 struct device *dev) 284 struct device *dev)
287{ 285{
@@ -755,24 +753,6 @@ static int __init genpd_poweroff_unused(void)
755} 753}
756late_initcall(genpd_poweroff_unused); 754late_initcall(genpd_poweroff_unused);
757 755
758#else
759
760static inline int genpd_dev_pm_qos_notifier(struct notifier_block *nb,
761 unsigned long val, void *ptr)
762{
763 return NOTIFY_DONE;
764}
765
766static inline void
767genpd_queue_power_off_work(struct generic_pm_domain *genpd) {}
768
769static inline void genpd_power_off_work_fn(struct work_struct *work) {}
770
771#define pm_genpd_runtime_suspend NULL
772#define pm_genpd_runtime_resume NULL
773
774#endif /* CONFIG_PM_RUNTIME */
775
776#ifdef CONFIG_PM_SLEEP 756#ifdef CONFIG_PM_SLEEP
777 757
778/** 758/**
@@ -1364,7 +1344,7 @@ void pm_genpd_syscore_poweron(struct device *dev)
1364} 1344}
1365EXPORT_SYMBOL_GPL(pm_genpd_syscore_poweron); 1345EXPORT_SYMBOL_GPL(pm_genpd_syscore_poweron);
1366 1346
1367#else 1347#else /* !CONFIG_PM_SLEEP */
1368 1348
1369#define pm_genpd_prepare NULL 1349#define pm_genpd_prepare NULL
1370#define pm_genpd_suspend NULL 1350#define pm_genpd_suspend NULL
@@ -2220,7 +2200,7 @@ int genpd_dev_pm_attach(struct device *dev)
2220 return 0; 2200 return 0;
2221} 2201}
2222EXPORT_SYMBOL_GPL(genpd_dev_pm_attach); 2202EXPORT_SYMBOL_GPL(genpd_dev_pm_attach);
2223#endif 2203#endif /* CONFIG_PM_GENERIC_DOMAINS_OF */
2224 2204
2225 2205
2226/*** debugfs support ***/ 2206/*** debugfs support ***/
@@ -2236,10 +2216,8 @@ static struct dentry *pm_genpd_debugfs_dir;
2236 2216
2237/* 2217/*
2238 * TODO: This function is a slightly modified version of rtpm_status_show 2218 * TODO: This function is a slightly modified version of rtpm_status_show
2239 * from sysfs.c, but dependencies between PM_GENERIC_DOMAINS and PM_RUNTIME 2219 * from sysfs.c, so generalize it.
2240 * are too loose to generalize it.
2241 */ 2220 */
2242#ifdef CONFIG_PM_RUNTIME
2243static void rtpm_status_str(struct seq_file *s, struct device *dev) 2221static void rtpm_status_str(struct seq_file *s, struct device *dev)
2244{ 2222{
2245 static const char * const status_lookup[] = { 2223 static const char * const status_lookup[] = {
@@ -2261,12 +2239,6 @@ static void rtpm_status_str(struct seq_file *s, struct device *dev)
2261 2239
2262 seq_puts(s, p); 2240 seq_puts(s, p);
2263} 2241}
2264#else
2265static void rtpm_status_str(struct seq_file *s, struct device *dev)
2266{
2267 seq_puts(s, "active");
2268}
2269#endif
2270 2242
2271static int pm_genpd_summary_one(struct seq_file *s, 2243static int pm_genpd_summary_one(struct seq_file *s,
2272 struct generic_pm_domain *gpd) 2244 struct generic_pm_domain *gpd)