diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-11-27 16:38:05 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-12-03 18:46:58 -0500 |
commit | d30d819dc83107812d9b2876e5e7194e511ed6af (patch) | |
tree | 0c889e71575dca8d9caa26c89cd9ec741632c4fd /drivers | |
parent | ef9cc993cd2e3524d86e86e9ad510e8f34b9c078 (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')
-rw-r--r-- | drivers/base/power/clock_ops.c | 69 | ||||
-rw-r--r-- | drivers/base/power/domain.c | 34 | ||||
-rw-r--r-- | drivers/base/power/domain_governor.c | 11 | ||||
-rw-r--r-- | drivers/base/power/power.h | 56 | ||||
-rw-r--r-- | drivers/base/power/qos.c | 5 | ||||
-rw-r--r-- | drivers/base/power/runtime.c | 9 | ||||
-rw-r--r-- | drivers/base/power/sysfs.c | 19 |
7 files changed, 31 insertions, 172 deletions
diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c index b32b5d47b3c5..d626576a4f75 100644 --- a/drivers/base/power/clock_ops.c +++ b/drivers/base/power/clock_ops.c | |||
@@ -256,10 +256,6 @@ void pm_clk_destroy(struct device *dev) | |||
256 | } | 256 | } |
257 | } | 257 | } |
258 | 258 | ||
259 | #endif /* CONFIG_PM */ | ||
260 | |||
261 | #ifdef CONFIG_PM_RUNTIME | ||
262 | |||
263 | /** | 259 | /** |
264 | * pm_clk_suspend - Disable clocks in a device's PM clock list. | 260 | * pm_clk_suspend - Disable clocks in a device's PM clock list. |
265 | * @dev: Device to disable the clocks for. | 261 | * @dev: Device to disable the clocks for. |
@@ -373,68 +369,7 @@ static int pm_clk_notify(struct notifier_block *nb, | |||
373 | return 0; | 369 | return 0; |
374 | } | 370 | } |
375 | 371 | ||
376 | #else /* !CONFIG_PM_RUNTIME */ | 372 | #else /* !CONFIG_PM */ |
377 | |||
378 | #ifdef CONFIG_PM | ||
379 | |||
380 | /** | ||
381 | * pm_clk_suspend - Disable clocks in a device's PM clock list. | ||
382 | * @dev: Device to disable the clocks for. | ||
383 | */ | ||
384 | int pm_clk_suspend(struct device *dev) | ||
385 | { | ||
386 | struct pm_subsys_data *psd = dev_to_psd(dev); | ||
387 | struct pm_clock_entry *ce; | ||
388 | unsigned long flags; | ||
389 | |||
390 | dev_dbg(dev, "%s()\n", __func__); | ||
391 | |||
392 | /* If there is no driver, the clocks are already disabled. */ | ||
393 | if (!psd || !dev->driver) | ||
394 | return 0; | ||
395 | |||
396 | spin_lock_irqsave(&psd->lock, flags); | ||
397 | |||
398 | list_for_each_entry_reverse(ce, &psd->clock_list, node) { | ||
399 | if (ce->status < PCE_STATUS_ERROR) { | ||
400 | if (ce->status == PCE_STATUS_ENABLED) | ||
401 | clk_disable(ce->clk); | ||
402 | ce->status = PCE_STATUS_ACQUIRED; | ||
403 | } | ||
404 | } | ||
405 | |||
406 | spin_unlock_irqrestore(&psd->lock, flags); | ||
407 | |||
408 | return 0; | ||
409 | } | ||
410 | |||
411 | /** | ||
412 | * pm_clk_resume - Enable clocks in a device's PM clock list. | ||
413 | * @dev: Device to enable the clocks for. | ||
414 | */ | ||
415 | int pm_clk_resume(struct device *dev) | ||
416 | { | ||
417 | struct pm_subsys_data *psd = dev_to_psd(dev); | ||
418 | struct pm_clock_entry *ce; | ||
419 | unsigned long flags; | ||
420 | |||
421 | dev_dbg(dev, "%s()\n", __func__); | ||
422 | |||
423 | /* If there is no driver, the clocks should remain disabled. */ | ||
424 | if (!psd || !dev->driver) | ||
425 | return 0; | ||
426 | |||
427 | spin_lock_irqsave(&psd->lock, flags); | ||
428 | |||
429 | list_for_each_entry(ce, &psd->clock_list, node) | ||
430 | __pm_clk_enable(dev, ce); | ||
431 | |||
432 | spin_unlock_irqrestore(&psd->lock, flags); | ||
433 | |||
434 | return 0; | ||
435 | } | ||
436 | |||
437 | #endif /* CONFIG_PM */ | ||
438 | 373 | ||
439 | /** | 374 | /** |
440 | * enable_clock - Enable a device clock. | 375 | * enable_clock - Enable a device clock. |
@@ -514,7 +449,7 @@ static int pm_clk_notify(struct notifier_block *nb, | |||
514 | return 0; | 449 | return 0; |
515 | } | 450 | } |
516 | 451 | ||
517 | #endif /* !CONFIG_PM_RUNTIME */ | 452 | #endif /* !CONFIG_PM */ |
518 | 453 | ||
519 | /** | 454 | /** |
520 | * pm_clk_add_notifier - Add bus type notifier for power management clocks. | 455 | * pm_clk_add_notifier - Add bus type notifier for power management clocks. |
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 | |||
285 | static int genpd_start_dev_no_timing(struct generic_pm_domain *genpd, | 283 | static 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 | } |
756 | late_initcall(genpd_poweroff_unused); | 754 | late_initcall(genpd_poweroff_unused); |
757 | 755 | ||
758 | #else | ||
759 | |||
760 | static inline int genpd_dev_pm_qos_notifier(struct notifier_block *nb, | ||
761 | unsigned long val, void *ptr) | ||
762 | { | ||
763 | return NOTIFY_DONE; | ||
764 | } | ||
765 | |||
766 | static inline void | ||
767 | genpd_queue_power_off_work(struct generic_pm_domain *genpd) {} | ||
768 | |||
769 | static 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 | } |
1365 | EXPORT_SYMBOL_GPL(pm_genpd_syscore_poweron); | 1345 | EXPORT_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 | } |
2222 | EXPORT_SYMBOL_GPL(genpd_dev_pm_attach); | 2202 | EXPORT_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 | ||
2243 | static void rtpm_status_str(struct seq_file *s, struct device *dev) | 2221 | static 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 | ||
2265 | static void rtpm_status_str(struct seq_file *s, struct device *dev) | ||
2266 | { | ||
2267 | seq_puts(s, "active"); | ||
2268 | } | ||
2269 | #endif | ||
2270 | 2242 | ||
2271 | static int pm_genpd_summary_one(struct seq_file *s, | 2243 | static int pm_genpd_summary_one(struct seq_file *s, |
2272 | struct generic_pm_domain *gpd) | 2244 | struct generic_pm_domain *gpd) |
diff --git a/drivers/base/power/domain_governor.c b/drivers/base/power/domain_governor.c index d88a62e104d4..2a4154a09e4d 100644 --- a/drivers/base/power/domain_governor.c +++ b/drivers/base/power/domain_governor.c | |||
@@ -11,8 +11,6 @@ | |||
11 | #include <linux/pm_qos.h> | 11 | #include <linux/pm_qos.h> |
12 | #include <linux/hrtimer.h> | 12 | #include <linux/hrtimer.h> |
13 | 13 | ||
14 | #ifdef CONFIG_PM_RUNTIME | ||
15 | |||
16 | static int dev_update_qos_constraint(struct device *dev, void *data) | 14 | static int dev_update_qos_constraint(struct device *dev, void *data) |
17 | { | 15 | { |
18 | s64 *constraint_ns_p = data; | 16 | s64 *constraint_ns_p = data; |
@@ -227,15 +225,6 @@ static bool always_on_power_down_ok(struct dev_pm_domain *domain) | |||
227 | return false; | 225 | return false; |
228 | } | 226 | } |
229 | 227 | ||
230 | #else /* !CONFIG_PM_RUNTIME */ | ||
231 | |||
232 | static inline bool default_stop_ok(struct device *dev) { return false; } | ||
233 | |||
234 | #define default_power_down_ok NULL | ||
235 | #define always_on_power_down_ok NULL | ||
236 | |||
237 | #endif /* !CONFIG_PM_RUNTIME */ | ||
238 | |||
239 | struct dev_power_governor simple_qos_governor = { | 228 | struct dev_power_governor simple_qos_governor = { |
240 | .stop_ok = default_stop_ok, | 229 | .stop_ok = default_stop_ok, |
241 | .power_down_ok = default_power_down_ok, | 230 | .power_down_ok = default_power_down_ok, |
diff --git a/drivers/base/power/power.h b/drivers/base/power/power.h index a21223d95926..b6b8a273c5da 100644 --- a/drivers/base/power/power.h +++ b/drivers/base/power/power.h | |||
@@ -9,7 +9,7 @@ static inline void device_pm_init_common(struct device *dev) | |||
9 | } | 9 | } |
10 | } | 10 | } |
11 | 11 | ||
12 | #ifdef CONFIG_PM_RUNTIME | 12 | #ifdef CONFIG_PM |
13 | 13 | ||
14 | static inline void pm_runtime_early_init(struct device *dev) | 14 | static inline void pm_runtime_early_init(struct device *dev) |
15 | { | 15 | { |
@@ -20,7 +20,21 @@ static inline void pm_runtime_early_init(struct device *dev) | |||
20 | extern void pm_runtime_init(struct device *dev); | 20 | extern void pm_runtime_init(struct device *dev); |
21 | extern void pm_runtime_remove(struct device *dev); | 21 | extern void pm_runtime_remove(struct device *dev); |
22 | 22 | ||
23 | #else /* !CONFIG_PM_RUNTIME */ | 23 | /* |
24 | * sysfs.c | ||
25 | */ | ||
26 | |||
27 | extern int dpm_sysfs_add(struct device *dev); | ||
28 | extern void dpm_sysfs_remove(struct device *dev); | ||
29 | extern void rpm_sysfs_remove(struct device *dev); | ||
30 | extern int wakeup_sysfs_add(struct device *dev); | ||
31 | extern void wakeup_sysfs_remove(struct device *dev); | ||
32 | extern int pm_qos_sysfs_add_resume_latency(struct device *dev); | ||
33 | extern void pm_qos_sysfs_remove_resume_latency(struct device *dev); | ||
34 | extern int pm_qos_sysfs_add_flags(struct device *dev); | ||
35 | extern void pm_qos_sysfs_remove_flags(struct device *dev); | ||
36 | |||
37 | #else /* CONFIG_PM */ | ||
24 | 38 | ||
25 | static inline void pm_runtime_early_init(struct device *dev) | 39 | static inline void pm_runtime_early_init(struct device *dev) |
26 | { | 40 | { |
@@ -30,7 +44,15 @@ static inline void pm_runtime_early_init(struct device *dev) | |||
30 | static inline void pm_runtime_init(struct device *dev) {} | 44 | static inline void pm_runtime_init(struct device *dev) {} |
31 | static inline void pm_runtime_remove(struct device *dev) {} | 45 | static inline void pm_runtime_remove(struct device *dev) {} |
32 | 46 | ||
33 | #endif /* !CONFIG_PM_RUNTIME */ | 47 | static inline int dpm_sysfs_add(struct device *dev) { return 0; } |
48 | static inline void dpm_sysfs_remove(struct device *dev) {} | ||
49 | static inline void rpm_sysfs_remove(struct device *dev) {} | ||
50 | static inline int wakeup_sysfs_add(struct device *dev) { return 0; } | ||
51 | static inline void wakeup_sysfs_remove(struct device *dev) {} | ||
52 | static inline int pm_qos_sysfs_add(struct device *dev) { return 0; } | ||
53 | static inline void pm_qos_sysfs_remove(struct device *dev) {} | ||
54 | |||
55 | #endif | ||
34 | 56 | ||
35 | #ifdef CONFIG_PM_SLEEP | 57 | #ifdef CONFIG_PM_SLEEP |
36 | 58 | ||
@@ -77,31 +99,3 @@ static inline void device_pm_init(struct device *dev) | |||
77 | device_pm_sleep_init(dev); | 99 | device_pm_sleep_init(dev); |
78 | pm_runtime_init(dev); | 100 | pm_runtime_init(dev); |
79 | } | 101 | } |
80 | |||
81 | #ifdef CONFIG_PM | ||
82 | |||
83 | /* | ||
84 | * sysfs.c | ||
85 | */ | ||
86 | |||
87 | extern int dpm_sysfs_add(struct device *dev); | ||
88 | extern void dpm_sysfs_remove(struct device *dev); | ||
89 | extern void rpm_sysfs_remove(struct device *dev); | ||
90 | extern int wakeup_sysfs_add(struct device *dev); | ||
91 | extern void wakeup_sysfs_remove(struct device *dev); | ||
92 | extern int pm_qos_sysfs_add_resume_latency(struct device *dev); | ||
93 | extern void pm_qos_sysfs_remove_resume_latency(struct device *dev); | ||
94 | extern int pm_qos_sysfs_add_flags(struct device *dev); | ||
95 | extern void pm_qos_sysfs_remove_flags(struct device *dev); | ||
96 | |||
97 | #else /* CONFIG_PM */ | ||
98 | |||
99 | static inline int dpm_sysfs_add(struct device *dev) { return 0; } | ||
100 | static inline void dpm_sysfs_remove(struct device *dev) {} | ||
101 | static inline void rpm_sysfs_remove(struct device *dev) {} | ||
102 | static inline int wakeup_sysfs_add(struct device *dev) { return 0; } | ||
103 | static inline void wakeup_sysfs_remove(struct device *dev) {} | ||
104 | static inline int pm_qos_sysfs_add(struct device *dev) { return 0; } | ||
105 | static inline void pm_qos_sysfs_remove(struct device *dev) {} | ||
106 | |||
107 | #endif | ||
diff --git a/drivers/base/power/qos.c b/drivers/base/power/qos.c index 36b9eb4862cb..a8fe4c1a8d07 100644 --- a/drivers/base/power/qos.c +++ b/drivers/base/power/qos.c | |||
@@ -599,7 +599,6 @@ int dev_pm_qos_add_ancestor_request(struct device *dev, | |||
599 | } | 599 | } |
600 | EXPORT_SYMBOL_GPL(dev_pm_qos_add_ancestor_request); | 600 | EXPORT_SYMBOL_GPL(dev_pm_qos_add_ancestor_request); |
601 | 601 | ||
602 | #ifdef CONFIG_PM_RUNTIME | ||
603 | static void __dev_pm_qos_drop_user_request(struct device *dev, | 602 | static void __dev_pm_qos_drop_user_request(struct device *dev, |
604 | enum dev_pm_qos_req_type type) | 603 | enum dev_pm_qos_req_type type) |
605 | { | 604 | { |
@@ -880,7 +879,3 @@ int dev_pm_qos_update_user_latency_tolerance(struct device *dev, s32 val) | |||
880 | mutex_unlock(&dev_pm_qos_mtx); | 879 | mutex_unlock(&dev_pm_qos_mtx); |
881 | return ret; | 880 | return ret; |
882 | } | 881 | } |
883 | #else /* !CONFIG_PM_RUNTIME */ | ||
884 | static void __dev_pm_qos_hide_latency_limit(struct device *dev) {} | ||
885 | static void __dev_pm_qos_hide_flags(struct device *dev) {} | ||
886 | #endif /* CONFIG_PM_RUNTIME */ | ||
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 8f1ab8446caa..5070c4fe8542 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c | |||
@@ -45,8 +45,6 @@ static pm_callback_t __rpm_get_callback(struct device *dev, size_t cb_offset) | |||
45 | #define RPM_GET_CALLBACK(dev, callback) \ | 45 | #define RPM_GET_CALLBACK(dev, callback) \ |
46 | __rpm_get_callback(dev, offsetof(struct dev_pm_ops, callback)) | 46 | __rpm_get_callback(dev, offsetof(struct dev_pm_ops, callback)) |
47 | 47 | ||
48 | #ifdef CONFIG_PM_RUNTIME | ||
49 | |||
50 | static int rpm_resume(struct device *dev, int rpmflags); | 48 | static int rpm_resume(struct device *dev, int rpmflags); |
51 | static int rpm_suspend(struct device *dev, int rpmflags); | 49 | static int rpm_suspend(struct device *dev, int rpmflags); |
52 | 50 | ||
@@ -1399,7 +1397,6 @@ void pm_runtime_remove(struct device *dev) | |||
1399 | if (dev->power.irq_safe && dev->parent) | 1397 | if (dev->power.irq_safe && dev->parent) |
1400 | pm_runtime_put(dev->parent); | 1398 | pm_runtime_put(dev->parent); |
1401 | } | 1399 | } |
1402 | #endif | ||
1403 | 1400 | ||
1404 | /** | 1401 | /** |
1405 | * pm_runtime_force_suspend - Force a device into suspend state if needed. | 1402 | * pm_runtime_force_suspend - Force a device into suspend state if needed. |
@@ -1419,12 +1416,6 @@ int pm_runtime_force_suspend(struct device *dev) | |||
1419 | int ret = 0; | 1416 | int ret = 0; |
1420 | 1417 | ||
1421 | pm_runtime_disable(dev); | 1418 | pm_runtime_disable(dev); |
1422 | |||
1423 | /* | ||
1424 | * Note that pm_runtime_status_suspended() returns false while | ||
1425 | * !CONFIG_PM_RUNTIME, which means the device will be put into low | ||
1426 | * power state. | ||
1427 | */ | ||
1428 | if (pm_runtime_status_suspended(dev)) | 1419 | if (pm_runtime_status_suspended(dev)) |
1429 | return 0; | 1420 | return 0; |
1430 | 1421 | ||
diff --git a/drivers/base/power/sysfs.c b/drivers/base/power/sysfs.c index a9d26ed11bf4..d2be3f9c211c 100644 --- a/drivers/base/power/sysfs.c +++ b/drivers/base/power/sysfs.c | |||
@@ -95,7 +95,6 @@ | |||
95 | const char power_group_name[] = "power"; | 95 | const char power_group_name[] = "power"; |
96 | EXPORT_SYMBOL_GPL(power_group_name); | 96 | EXPORT_SYMBOL_GPL(power_group_name); |
97 | 97 | ||
98 | #ifdef CONFIG_PM_RUNTIME | ||
99 | static const char ctrl_auto[] = "auto"; | 98 | static const char ctrl_auto[] = "auto"; |
100 | static const char ctrl_on[] = "on"; | 99 | static const char ctrl_on[] = "on"; |
101 | 100 | ||
@@ -330,7 +329,6 @@ static ssize_t pm_qos_remote_wakeup_store(struct device *dev, | |||
330 | 329 | ||
331 | static DEVICE_ATTR(pm_qos_remote_wakeup, 0644, | 330 | static DEVICE_ATTR(pm_qos_remote_wakeup, 0644, |
332 | pm_qos_remote_wakeup_show, pm_qos_remote_wakeup_store); | 331 | pm_qos_remote_wakeup_show, pm_qos_remote_wakeup_store); |
333 | #endif /* CONFIG_PM_RUNTIME */ | ||
334 | 332 | ||
335 | #ifdef CONFIG_PM_SLEEP | 333 | #ifdef CONFIG_PM_SLEEP |
336 | static const char _enabled[] = "enabled"; | 334 | static const char _enabled[] = "enabled"; |
@@ -531,8 +529,6 @@ static DEVICE_ATTR(wakeup_prevent_sleep_time_ms, 0444, | |||
531 | #endif /* CONFIG_PM_SLEEP */ | 529 | #endif /* CONFIG_PM_SLEEP */ |
532 | 530 | ||
533 | #ifdef CONFIG_PM_ADVANCED_DEBUG | 531 | #ifdef CONFIG_PM_ADVANCED_DEBUG |
534 | #ifdef CONFIG_PM_RUNTIME | ||
535 | |||
536 | static ssize_t rtpm_usagecount_show(struct device *dev, | 532 | static ssize_t rtpm_usagecount_show(struct device *dev, |
537 | struct device_attribute *attr, char *buf) | 533 | struct device_attribute *attr, char *buf) |
538 | { | 534 | { |
@@ -562,10 +558,7 @@ static DEVICE_ATTR(runtime_usage, 0444, rtpm_usagecount_show, NULL); | |||
562 | static DEVICE_ATTR(runtime_active_kids, 0444, rtpm_children_show, NULL); | 558 | static DEVICE_ATTR(runtime_active_kids, 0444, rtpm_children_show, NULL); |
563 | static DEVICE_ATTR(runtime_enabled, 0444, rtpm_enabled_show, NULL); | 559 | static DEVICE_ATTR(runtime_enabled, 0444, rtpm_enabled_show, NULL); |
564 | 560 | ||
565 | #endif | ||
566 | |||
567 | #ifdef CONFIG_PM_SLEEP | 561 | #ifdef CONFIG_PM_SLEEP |
568 | |||
569 | static ssize_t async_show(struct device *dev, struct device_attribute *attr, | 562 | static ssize_t async_show(struct device *dev, struct device_attribute *attr, |
570 | char *buf) | 563 | char *buf) |
571 | { | 564 | { |
@@ -595,7 +588,7 @@ static ssize_t async_store(struct device *dev, struct device_attribute *attr, | |||
595 | 588 | ||
596 | static DEVICE_ATTR(async, 0644, async_show, async_store); | 589 | static DEVICE_ATTR(async, 0644, async_show, async_store); |
597 | 590 | ||
598 | #endif | 591 | #endif /* CONFIG_PM_SLEEP */ |
599 | #endif /* CONFIG_PM_ADVANCED_DEBUG */ | 592 | #endif /* CONFIG_PM_ADVANCED_DEBUG */ |
600 | 593 | ||
601 | static struct attribute *power_attrs[] = { | 594 | static struct attribute *power_attrs[] = { |
@@ -603,12 +596,10 @@ static struct attribute *power_attrs[] = { | |||
603 | #ifdef CONFIG_PM_SLEEP | 596 | #ifdef CONFIG_PM_SLEEP |
604 | &dev_attr_async.attr, | 597 | &dev_attr_async.attr, |
605 | #endif | 598 | #endif |
606 | #ifdef CONFIG_PM_RUNTIME | ||
607 | &dev_attr_runtime_status.attr, | 599 | &dev_attr_runtime_status.attr, |
608 | &dev_attr_runtime_usage.attr, | 600 | &dev_attr_runtime_usage.attr, |
609 | &dev_attr_runtime_active_kids.attr, | 601 | &dev_attr_runtime_active_kids.attr, |
610 | &dev_attr_runtime_enabled.attr, | 602 | &dev_attr_runtime_enabled.attr, |
611 | #endif | ||
612 | #endif /* CONFIG_PM_ADVANCED_DEBUG */ | 603 | #endif /* CONFIG_PM_ADVANCED_DEBUG */ |
613 | NULL, | 604 | NULL, |
614 | }; | 605 | }; |
@@ -640,7 +631,6 @@ static struct attribute_group pm_wakeup_attr_group = { | |||
640 | }; | 631 | }; |
641 | 632 | ||
642 | static struct attribute *runtime_attrs[] = { | 633 | static struct attribute *runtime_attrs[] = { |
643 | #ifdef CONFIG_PM_RUNTIME | ||
644 | #ifndef CONFIG_PM_ADVANCED_DEBUG | 634 | #ifndef CONFIG_PM_ADVANCED_DEBUG |
645 | &dev_attr_runtime_status.attr, | 635 | &dev_attr_runtime_status.attr, |
646 | #endif | 636 | #endif |
@@ -648,7 +638,6 @@ static struct attribute *runtime_attrs[] = { | |||
648 | &dev_attr_runtime_suspended_time.attr, | 638 | &dev_attr_runtime_suspended_time.attr, |
649 | &dev_attr_runtime_active_time.attr, | 639 | &dev_attr_runtime_active_time.attr, |
650 | &dev_attr_autosuspend_delay_ms.attr, | 640 | &dev_attr_autosuspend_delay_ms.attr, |
651 | #endif /* CONFIG_PM_RUNTIME */ | ||
652 | NULL, | 641 | NULL, |
653 | }; | 642 | }; |
654 | static struct attribute_group pm_runtime_attr_group = { | 643 | static struct attribute_group pm_runtime_attr_group = { |
@@ -657,9 +646,7 @@ static struct attribute_group pm_runtime_attr_group = { | |||
657 | }; | 646 | }; |
658 | 647 | ||
659 | static struct attribute *pm_qos_resume_latency_attrs[] = { | 648 | static struct attribute *pm_qos_resume_latency_attrs[] = { |
660 | #ifdef CONFIG_PM_RUNTIME | ||
661 | &dev_attr_pm_qos_resume_latency_us.attr, | 649 | &dev_attr_pm_qos_resume_latency_us.attr, |
662 | #endif /* CONFIG_PM_RUNTIME */ | ||
663 | NULL, | 650 | NULL, |
664 | }; | 651 | }; |
665 | static struct attribute_group pm_qos_resume_latency_attr_group = { | 652 | static struct attribute_group pm_qos_resume_latency_attr_group = { |
@@ -668,9 +655,7 @@ static struct attribute_group pm_qos_resume_latency_attr_group = { | |||
668 | }; | 655 | }; |
669 | 656 | ||
670 | static struct attribute *pm_qos_latency_tolerance_attrs[] = { | 657 | static struct attribute *pm_qos_latency_tolerance_attrs[] = { |
671 | #ifdef CONFIG_PM_RUNTIME | ||
672 | &dev_attr_pm_qos_latency_tolerance_us.attr, | 658 | &dev_attr_pm_qos_latency_tolerance_us.attr, |
673 | #endif /* CONFIG_PM_RUNTIME */ | ||
674 | NULL, | 659 | NULL, |
675 | }; | 660 | }; |
676 | static struct attribute_group pm_qos_latency_tolerance_attr_group = { | 661 | static struct attribute_group pm_qos_latency_tolerance_attr_group = { |
@@ -679,10 +664,8 @@ static struct attribute_group pm_qos_latency_tolerance_attr_group = { | |||
679 | }; | 664 | }; |
680 | 665 | ||
681 | static struct attribute *pm_qos_flags_attrs[] = { | 666 | static struct attribute *pm_qos_flags_attrs[] = { |
682 | #ifdef CONFIG_PM_RUNTIME | ||
683 | &dev_attr_pm_qos_no_power_off.attr, | 667 | &dev_attr_pm_qos_no_power_off.attr, |
684 | &dev_attr_pm_qos_remote_wakeup.attr, | 668 | &dev_attr_pm_qos_remote_wakeup.attr, |
685 | #endif /* CONFIG_PM_RUNTIME */ | ||
686 | NULL, | 669 | NULL, |
687 | }; | 670 | }; |
688 | static struct attribute_group pm_qos_flags_attr_group = { | 671 | static struct attribute_group pm_qos_flags_attr_group = { |