diff options
Diffstat (limited to 'drivers/base/power/power.h')
-rw-r--r-- | drivers/base/power/power.h | 56 |
1 files changed, 25 insertions, 31 deletions
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 | ||