Because cpuidle is the only user of the effective constraint coming from the CPU latency QoS, add #ifdef CONFIG_CPU_IDLE around that code to avoid building it unnecessarily.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -143,11 +143,24 @@ bool pm_qos_update_flags(struct pm_qos_flags *pqf, · 142 unmodified lines | |||
| 143 | struct pm_qos_flags_request *req, | 143 | struct pm_qos_flags_request *req, |
| 144 | enum pm_qos_req_action action, s32 val); | 144 | enum pm_qos_req_action action, s32 val); |
| 145 | 145 | ||
| 146 | #ifdef CONFIG_CPU_IDLE | ||
| 146 | s32 cpu_latency_qos_limit(void); | 147 | s32 cpu_latency_qos_limit(void); |
| 147 | bool cpu_latency_qos_request_active(struct pm_qos_request *req); | 148 | bool cpu_latency_qos_request_active(struct pm_qos_request *req); |
| 148 | void cpu_latency_qos_add_request(struct pm_qos_request *req, s32 value); | 149 | void cpu_latency_qos_add_request(struct pm_qos_request *req, s32 value); |
| 149 | void cpu_latency_qos_update_request(struct pm_qos_request *req, s32 new_value); | 150 | void cpu_latency_qos_update_request(struct pm_qos_request *req, s32 new_value); |
| 150 | void cpu_latency_qos_remove_request(struct pm_qos_request *req); | 151 | void cpu_latency_qos_remove_request(struct pm_qos_request *req); |
| 152 | #else | ||
| 153 | static inline s32 cpu_latency_qos_limit(void) { return INT_MAX; } | ||
| 154 | static inline bool cpu_latency_qos_request_active(struct pm_qos_request *req) | ||
| 155 | { | ||
| 156 | return false; | ||
| 157 | } | ||
| 158 | static inline void cpu_latency_qos_add_request(struct pm_qos_request *req, | ||
| 159 | s32 value) {} | ||
| 160 | static inline void cpu_latency_qos_update_request(struct pm_qos_request *req, | ||
| 161 | s32 new_value) {} | ||
| 162 | static inline void cpu_latency_qos_remove_request(struct pm_qos_request *req) {} | ||
| 163 | #endif | ||
| 151 | 164 | ||
| 152 | #ifdef CONFIG_PM | 165 | #ifdef CONFIG_PM |
| 153 | enum pm_qos_flags_status __dev_pm_qos_flags(struct device *dev, s32 mask); | 166 | enum pm_qos_flags_status __dev_pm_qos_flags(struct device *dev, s32 mask); |