diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/ac.c | 4 | ||||
-rw-r--r-- | drivers/acpi/acpica/achware.h | 12 | ||||
-rw-r--r-- | drivers/acpi/acpica/hwesleep.c | 19 | ||||
-rw-r--r-- | drivers/acpi/acpica/hwsleep.c | 20 | ||||
-rw-r--r-- | drivers/acpi/acpica/hwxfsleep.c | 22 | ||||
-rw-r--r-- | drivers/acpi/acpica/tbxface.c | 1 | ||||
-rw-r--r-- | drivers/acpi/battery.c | 2 | ||||
-rw-r--r-- | drivers/acpi/button.c | 4 | ||||
-rw-r--r-- | drivers/acpi/fan.c | 4 | ||||
-rw-r--r-- | drivers/acpi/numa.c | 12 | ||||
-rw-r--r-- | drivers/acpi/pci_root.c | 11 | ||||
-rw-r--r-- | drivers/acpi/power.c | 4 | ||||
-rw-r--r-- | drivers/acpi/processor_driver.c | 2 | ||||
-rw-r--r-- | drivers/acpi/sbs.c | 2 | ||||
-rw-r--r-- | drivers/acpi/sleep.c | 75 | ||||
-rw-r--r-- | drivers/acpi/sysfs.c | 4 | ||||
-rw-r--r-- | drivers/acpi/thermal.c | 4 |
17 files changed, 77 insertions, 125 deletions
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index ac7034129f3f..d5fdd36190cc 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c | |||
@@ -69,7 +69,9 @@ static const struct acpi_device_id ac_device_ids[] = { | |||
69 | }; | 69 | }; |
70 | MODULE_DEVICE_TABLE(acpi, ac_device_ids); | 70 | MODULE_DEVICE_TABLE(acpi, ac_device_ids); |
71 | 71 | ||
72 | #ifdef CONFIG_PM_SLEEP | ||
72 | static int acpi_ac_resume(struct device *dev); | 73 | static int acpi_ac_resume(struct device *dev); |
74 | #endif | ||
73 | static SIMPLE_DEV_PM_OPS(acpi_ac_pm, NULL, acpi_ac_resume); | 75 | static SIMPLE_DEV_PM_OPS(acpi_ac_pm, NULL, acpi_ac_resume); |
74 | 76 | ||
75 | static struct acpi_driver acpi_ac_driver = { | 77 | static struct acpi_driver acpi_ac_driver = { |
@@ -313,6 +315,7 @@ static int acpi_ac_add(struct acpi_device *device) | |||
313 | return result; | 315 | return result; |
314 | } | 316 | } |
315 | 317 | ||
318 | #ifdef CONFIG_PM_SLEEP | ||
316 | static int acpi_ac_resume(struct device *dev) | 319 | static int acpi_ac_resume(struct device *dev) |
317 | { | 320 | { |
318 | struct acpi_ac *ac; | 321 | struct acpi_ac *ac; |
@@ -332,6 +335,7 @@ static int acpi_ac_resume(struct device *dev) | |||
332 | kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE); | 335 | kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE); |
333 | return 0; | 336 | return 0; |
334 | } | 337 | } |
338 | #endif | ||
335 | 339 | ||
336 | static int acpi_ac_remove(struct acpi_device *device, int type) | 340 | static int acpi_ac_remove(struct acpi_device *device, int type) |
337 | { | 341 | { |
diff --git a/drivers/acpi/acpica/achware.h b/drivers/acpi/acpica/achware.h index 5ccb99ae3a6f..5de4ec72766d 100644 --- a/drivers/acpi/acpica/achware.h +++ b/drivers/acpi/acpica/achware.h | |||
@@ -83,22 +83,22 @@ acpi_status acpi_hw_clear_acpi_status(void); | |||
83 | /* | 83 | /* |
84 | * hwsleep - sleep/wake support (Legacy sleep registers) | 84 | * hwsleep - sleep/wake support (Legacy sleep registers) |
85 | */ | 85 | */ |
86 | acpi_status acpi_hw_legacy_sleep(u8 sleep_state, u8 flags); | 86 | acpi_status acpi_hw_legacy_sleep(u8 sleep_state); |
87 | 87 | ||
88 | acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state, u8 flags); | 88 | acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state); |
89 | 89 | ||
90 | acpi_status acpi_hw_legacy_wake(u8 sleep_state, u8 flags); | 90 | acpi_status acpi_hw_legacy_wake(u8 sleep_state); |
91 | 91 | ||
92 | /* | 92 | /* |
93 | * hwesleep - sleep/wake support (Extended FADT-V5 sleep registers) | 93 | * hwesleep - sleep/wake support (Extended FADT-V5 sleep registers) |
94 | */ | 94 | */ |
95 | void acpi_hw_execute_sleep_method(char *method_name, u32 integer_argument); | 95 | void acpi_hw_execute_sleep_method(char *method_name, u32 integer_argument); |
96 | 96 | ||
97 | acpi_status acpi_hw_extended_sleep(u8 sleep_state, u8 flags); | 97 | acpi_status acpi_hw_extended_sleep(u8 sleep_state); |
98 | 98 | ||
99 | acpi_status acpi_hw_extended_wake_prep(u8 sleep_state, u8 flags); | 99 | acpi_status acpi_hw_extended_wake_prep(u8 sleep_state); |
100 | 100 | ||
101 | acpi_status acpi_hw_extended_wake(u8 sleep_state, u8 flags); | 101 | acpi_status acpi_hw_extended_wake(u8 sleep_state); |
102 | 102 | ||
103 | /* | 103 | /* |
104 | * hwvalid - Port I/O with validation | 104 | * hwvalid - Port I/O with validation |
diff --git a/drivers/acpi/acpica/hwesleep.c b/drivers/acpi/acpica/hwesleep.c index 48518dac5342..94996f9ae3ad 100644 --- a/drivers/acpi/acpica/hwesleep.c +++ b/drivers/acpi/acpica/hwesleep.c | |||
@@ -90,7 +90,6 @@ void acpi_hw_execute_sleep_method(char *method_pathname, u32 integer_argument) | |||
90 | * FUNCTION: acpi_hw_extended_sleep | 90 | * FUNCTION: acpi_hw_extended_sleep |
91 | * | 91 | * |
92 | * PARAMETERS: sleep_state - Which sleep state to enter | 92 | * PARAMETERS: sleep_state - Which sleep state to enter |
93 | * flags - ACPI_EXECUTE_GTS to run optional method | ||
94 | * | 93 | * |
95 | * RETURN: Status | 94 | * RETURN: Status |
96 | * | 95 | * |
@@ -100,7 +99,7 @@ void acpi_hw_execute_sleep_method(char *method_pathname, u32 integer_argument) | |||
100 | * | 99 | * |
101 | ******************************************************************************/ | 100 | ******************************************************************************/ |
102 | 101 | ||
103 | acpi_status acpi_hw_extended_sleep(u8 sleep_state, u8 flags) | 102 | acpi_status acpi_hw_extended_sleep(u8 sleep_state) |
104 | { | 103 | { |
105 | acpi_status status; | 104 | acpi_status status; |
106 | u8 sleep_type_value; | 105 | u8 sleep_type_value; |
@@ -125,12 +124,6 @@ acpi_status acpi_hw_extended_sleep(u8 sleep_state, u8 flags) | |||
125 | 124 | ||
126 | acpi_gbl_system_awake_and_running = FALSE; | 125 | acpi_gbl_system_awake_and_running = FALSE; |
127 | 126 | ||
128 | /* Optionally execute _GTS (Going To Sleep) */ | ||
129 | |||
130 | if (flags & ACPI_EXECUTE_GTS) { | ||
131 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__GTS, sleep_state); | ||
132 | } | ||
133 | |||
134 | /* Flush caches, as per ACPI specification */ | 127 | /* Flush caches, as per ACPI specification */ |
135 | 128 | ||
136 | ACPI_FLUSH_CPU_CACHE(); | 129 | ACPI_FLUSH_CPU_CACHE(); |
@@ -172,7 +165,6 @@ acpi_status acpi_hw_extended_sleep(u8 sleep_state, u8 flags) | |||
172 | * FUNCTION: acpi_hw_extended_wake_prep | 165 | * FUNCTION: acpi_hw_extended_wake_prep |
173 | * | 166 | * |
174 | * PARAMETERS: sleep_state - Which sleep state we just exited | 167 | * PARAMETERS: sleep_state - Which sleep state we just exited |
175 | * flags - ACPI_EXECUTE_BFS to run optional method | ||
176 | * | 168 | * |
177 | * RETURN: Status | 169 | * RETURN: Status |
178 | * | 170 | * |
@@ -181,7 +173,7 @@ acpi_status acpi_hw_extended_sleep(u8 sleep_state, u8 flags) | |||
181 | * | 173 | * |
182 | ******************************************************************************/ | 174 | ******************************************************************************/ |
183 | 175 | ||
184 | acpi_status acpi_hw_extended_wake_prep(u8 sleep_state, u8 flags) | 176 | acpi_status acpi_hw_extended_wake_prep(u8 sleep_state) |
185 | { | 177 | { |
186 | acpi_status status; | 178 | acpi_status status; |
187 | u8 sleep_type_value; | 179 | u8 sleep_type_value; |
@@ -200,11 +192,6 @@ acpi_status acpi_hw_extended_wake_prep(u8 sleep_state, u8 flags) | |||
200 | &acpi_gbl_FADT.sleep_control); | 192 | &acpi_gbl_FADT.sleep_control); |
201 | } | 193 | } |
202 | 194 | ||
203 | /* Optionally execute _BFS (Back From Sleep) */ | ||
204 | |||
205 | if (flags & ACPI_EXECUTE_BFS) { | ||
206 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__BFS, sleep_state); | ||
207 | } | ||
208 | return_ACPI_STATUS(AE_OK); | 195 | return_ACPI_STATUS(AE_OK); |
209 | } | 196 | } |
210 | 197 | ||
@@ -222,7 +209,7 @@ acpi_status acpi_hw_extended_wake_prep(u8 sleep_state, u8 flags) | |||
222 | * | 209 | * |
223 | ******************************************************************************/ | 210 | ******************************************************************************/ |
224 | 211 | ||
225 | acpi_status acpi_hw_extended_wake(u8 sleep_state, u8 flags) | 212 | acpi_status acpi_hw_extended_wake(u8 sleep_state) |
226 | { | 213 | { |
227 | ACPI_FUNCTION_TRACE(hw_extended_wake); | 214 | ACPI_FUNCTION_TRACE(hw_extended_wake); |
228 | 215 | ||
diff --git a/drivers/acpi/acpica/hwsleep.c b/drivers/acpi/acpica/hwsleep.c index 9960fe9ef533..3fddde056a5e 100644 --- a/drivers/acpi/acpica/hwsleep.c +++ b/drivers/acpi/acpica/hwsleep.c | |||
@@ -56,7 +56,6 @@ ACPI_MODULE_NAME("hwsleep") | |||
56 | * FUNCTION: acpi_hw_legacy_sleep | 56 | * FUNCTION: acpi_hw_legacy_sleep |
57 | * | 57 | * |
58 | * PARAMETERS: sleep_state - Which sleep state to enter | 58 | * PARAMETERS: sleep_state - Which sleep state to enter |
59 | * flags - ACPI_EXECUTE_GTS to run optional method | ||
60 | * | 59 | * |
61 | * RETURN: Status | 60 | * RETURN: Status |
62 | * | 61 | * |
@@ -64,7 +63,7 @@ ACPI_MODULE_NAME("hwsleep") | |||
64 | * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED | 63 | * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED |
65 | * | 64 | * |
66 | ******************************************************************************/ | 65 | ******************************************************************************/ |
67 | acpi_status acpi_hw_legacy_sleep(u8 sleep_state, u8 flags) | 66 | acpi_status acpi_hw_legacy_sleep(u8 sleep_state) |
68 | { | 67 | { |
69 | struct acpi_bit_register_info *sleep_type_reg_info; | 68 | struct acpi_bit_register_info *sleep_type_reg_info; |
70 | struct acpi_bit_register_info *sleep_enable_reg_info; | 69 | struct acpi_bit_register_info *sleep_enable_reg_info; |
@@ -110,12 +109,6 @@ acpi_status acpi_hw_legacy_sleep(u8 sleep_state, u8 flags) | |||
110 | return_ACPI_STATUS(status); | 109 | return_ACPI_STATUS(status); |
111 | } | 110 | } |
112 | 111 | ||
113 | /* Optionally execute _GTS (Going To Sleep) */ | ||
114 | |||
115 | if (flags & ACPI_EXECUTE_GTS) { | ||
116 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__GTS, sleep_state); | ||
117 | } | ||
118 | |||
119 | /* Get current value of PM1A control */ | 112 | /* Get current value of PM1A control */ |
120 | 113 | ||
121 | status = acpi_hw_register_read(ACPI_REGISTER_PM1_CONTROL, | 114 | status = acpi_hw_register_read(ACPI_REGISTER_PM1_CONTROL, |
@@ -214,7 +207,6 @@ acpi_status acpi_hw_legacy_sleep(u8 sleep_state, u8 flags) | |||
214 | * FUNCTION: acpi_hw_legacy_wake_prep | 207 | * FUNCTION: acpi_hw_legacy_wake_prep |
215 | * | 208 | * |
216 | * PARAMETERS: sleep_state - Which sleep state we just exited | 209 | * PARAMETERS: sleep_state - Which sleep state we just exited |
217 | * flags - ACPI_EXECUTE_BFS to run optional method | ||
218 | * | 210 | * |
219 | * RETURN: Status | 211 | * RETURN: Status |
220 | * | 212 | * |
@@ -224,7 +216,7 @@ acpi_status acpi_hw_legacy_sleep(u8 sleep_state, u8 flags) | |||
224 | * | 216 | * |
225 | ******************************************************************************/ | 217 | ******************************************************************************/ |
226 | 218 | ||
227 | acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state, u8 flags) | 219 | acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state) |
228 | { | 220 | { |
229 | acpi_status status; | 221 | acpi_status status; |
230 | struct acpi_bit_register_info *sleep_type_reg_info; | 222 | struct acpi_bit_register_info *sleep_type_reg_info; |
@@ -275,11 +267,6 @@ acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state, u8 flags) | |||
275 | } | 267 | } |
276 | } | 268 | } |
277 | 269 | ||
278 | /* Optionally execute _BFS (Back From Sleep) */ | ||
279 | |||
280 | if (flags & ACPI_EXECUTE_BFS) { | ||
281 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__BFS, sleep_state); | ||
282 | } | ||
283 | return_ACPI_STATUS(status); | 270 | return_ACPI_STATUS(status); |
284 | } | 271 | } |
285 | 272 | ||
@@ -288,7 +275,6 @@ acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state, u8 flags) | |||
288 | * FUNCTION: acpi_hw_legacy_wake | 275 | * FUNCTION: acpi_hw_legacy_wake |
289 | * | 276 | * |
290 | * PARAMETERS: sleep_state - Which sleep state we just exited | 277 | * PARAMETERS: sleep_state - Which sleep state we just exited |
291 | * flags - Reserved, set to zero | ||
292 | * | 278 | * |
293 | * RETURN: Status | 279 | * RETURN: Status |
294 | * | 280 | * |
@@ -297,7 +283,7 @@ acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state, u8 flags) | |||
297 | * | 283 | * |
298 | ******************************************************************************/ | 284 | ******************************************************************************/ |
299 | 285 | ||
300 | acpi_status acpi_hw_legacy_wake(u8 sleep_state, u8 flags) | 286 | acpi_status acpi_hw_legacy_wake(u8 sleep_state) |
301 | { | 287 | { |
302 | acpi_status status; | 288 | acpi_status status; |
303 | 289 | ||
diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c index f8684bfe7907..1f165a750ae2 100644 --- a/drivers/acpi/acpica/hwxfsleep.c +++ b/drivers/acpi/acpica/hwxfsleep.c | |||
@@ -50,7 +50,7 @@ ACPI_MODULE_NAME("hwxfsleep") | |||
50 | 50 | ||
51 | /* Local prototypes */ | 51 | /* Local prototypes */ |
52 | static acpi_status | 52 | static acpi_status |
53 | acpi_hw_sleep_dispatch(u8 sleep_state, u8 flags, u32 function_id); | 53 | acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id); |
54 | 54 | ||
55 | /* | 55 | /* |
56 | * Dispatch table used to efficiently branch to the various sleep | 56 | * Dispatch table used to efficiently branch to the various sleep |
@@ -235,7 +235,7 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_s4bios) | |||
235 | * | 235 | * |
236 | ******************************************************************************/ | 236 | ******************************************************************************/ |
237 | static acpi_status | 237 | static acpi_status |
238 | acpi_hw_sleep_dispatch(u8 sleep_state, u8 flags, u32 function_id) | 238 | acpi_hw_sleep_dispatch(u8 sleep_state, u32 function_id) |
239 | { | 239 | { |
240 | acpi_status status; | 240 | acpi_status status; |
241 | struct acpi_sleep_functions *sleep_functions = | 241 | struct acpi_sleep_functions *sleep_functions = |
@@ -248,11 +248,11 @@ acpi_hw_sleep_dispatch(u8 sleep_state, u8 flags, u32 function_id) | |||
248 | * use the extended sleep registers | 248 | * use the extended sleep registers |
249 | */ | 249 | */ |
250 | if (acpi_gbl_reduced_hardware || acpi_gbl_FADT.sleep_control.address) { | 250 | if (acpi_gbl_reduced_hardware || acpi_gbl_FADT.sleep_control.address) { |
251 | status = sleep_functions->extended_function(sleep_state, flags); | 251 | status = sleep_functions->extended_function(sleep_state); |
252 | } else { | 252 | } else { |
253 | /* Legacy sleep */ | 253 | /* Legacy sleep */ |
254 | 254 | ||
255 | status = sleep_functions->legacy_function(sleep_state, flags); | 255 | status = sleep_functions->legacy_function(sleep_state); |
256 | } | 256 | } |
257 | 257 | ||
258 | return (status); | 258 | return (status); |
@@ -262,7 +262,7 @@ acpi_hw_sleep_dispatch(u8 sleep_state, u8 flags, u32 function_id) | |||
262 | * For the case where reduced-hardware-only code is being generated, | 262 | * For the case where reduced-hardware-only code is being generated, |
263 | * we know that only the extended sleep registers are available | 263 | * we know that only the extended sleep registers are available |
264 | */ | 264 | */ |
265 | status = sleep_functions->extended_function(sleep_state, flags); | 265 | status = sleep_functions->extended_function(sleep_state); |
266 | return (status); | 266 | return (status); |
267 | 267 | ||
268 | #endif /* !ACPI_REDUCED_HARDWARE */ | 268 | #endif /* !ACPI_REDUCED_HARDWARE */ |
@@ -349,7 +349,6 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) | |||
349 | * FUNCTION: acpi_enter_sleep_state | 349 | * FUNCTION: acpi_enter_sleep_state |
350 | * | 350 | * |
351 | * PARAMETERS: sleep_state - Which sleep state to enter | 351 | * PARAMETERS: sleep_state - Which sleep state to enter |
352 | * flags - ACPI_EXECUTE_GTS to run optional method | ||
353 | * | 352 | * |
354 | * RETURN: Status | 353 | * RETURN: Status |
355 | * | 354 | * |
@@ -357,7 +356,7 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) | |||
357 | * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED | 356 | * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED |
358 | * | 357 | * |
359 | ******************************************************************************/ | 358 | ******************************************************************************/ |
360 | acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state, u8 flags) | 359 | acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) |
361 | { | 360 | { |
362 | acpi_status status; | 361 | acpi_status status; |
363 | 362 | ||
@@ -371,7 +370,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state, u8 flags) | |||
371 | } | 370 | } |
372 | 371 | ||
373 | status = | 372 | status = |
374 | acpi_hw_sleep_dispatch(sleep_state, flags, ACPI_SLEEP_FUNCTION_ID); | 373 | acpi_hw_sleep_dispatch(sleep_state, ACPI_SLEEP_FUNCTION_ID); |
375 | return_ACPI_STATUS(status); | 374 | return_ACPI_STATUS(status); |
376 | } | 375 | } |
377 | 376 | ||
@@ -391,14 +390,14 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state) | |||
391 | * Called with interrupts DISABLED. | 390 | * Called with interrupts DISABLED. |
392 | * | 391 | * |
393 | ******************************************************************************/ | 392 | ******************************************************************************/ |
394 | acpi_status acpi_leave_sleep_state_prep(u8 sleep_state, u8 flags) | 393 | acpi_status acpi_leave_sleep_state_prep(u8 sleep_state) |
395 | { | 394 | { |
396 | acpi_status status; | 395 | acpi_status status; |
397 | 396 | ||
398 | ACPI_FUNCTION_TRACE(acpi_leave_sleep_state_prep); | 397 | ACPI_FUNCTION_TRACE(acpi_leave_sleep_state_prep); |
399 | 398 | ||
400 | status = | 399 | status = |
401 | acpi_hw_sleep_dispatch(sleep_state, flags, | 400 | acpi_hw_sleep_dispatch(sleep_state, |
402 | ACPI_WAKE_PREP_FUNCTION_ID); | 401 | ACPI_WAKE_PREP_FUNCTION_ID); |
403 | return_ACPI_STATUS(status); | 402 | return_ACPI_STATUS(status); |
404 | } | 403 | } |
@@ -423,8 +422,7 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) | |||
423 | 422 | ||
424 | ACPI_FUNCTION_TRACE(acpi_leave_sleep_state); | 423 | ACPI_FUNCTION_TRACE(acpi_leave_sleep_state); |
425 | 424 | ||
426 | 425 | status = acpi_hw_sleep_dispatch(sleep_state, ACPI_WAKE_FUNCTION_ID); | |
427 | status = acpi_hw_sleep_dispatch(sleep_state, 0, ACPI_WAKE_FUNCTION_ID); | ||
428 | return_ACPI_STATUS(status); | 426 | return_ACPI_STATUS(status); |
429 | } | 427 | } |
430 | 428 | ||
diff --git a/drivers/acpi/acpica/tbxface.c b/drivers/acpi/acpica/tbxface.c index ea4c6d52605a..29e51bc01383 100644 --- a/drivers/acpi/acpica/tbxface.c +++ b/drivers/acpi/acpica/tbxface.c | |||
@@ -387,6 +387,7 @@ acpi_get_table_with_size(char *signature, | |||
387 | 387 | ||
388 | return (AE_NOT_FOUND); | 388 | return (AE_NOT_FOUND); |
389 | } | 389 | } |
390 | ACPI_EXPORT_SYMBOL(acpi_get_table_with_size) | ||
390 | 391 | ||
391 | acpi_status | 392 | acpi_status |
392 | acpi_get_table(char *signature, | 393 | acpi_get_table(char *signature, |
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index ff2c876ec412..45e3e1759fb8 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
@@ -1052,6 +1052,7 @@ static int acpi_battery_remove(struct acpi_device *device, int type) | |||
1052 | return 0; | 1052 | return 0; |
1053 | } | 1053 | } |
1054 | 1054 | ||
1055 | #ifdef CONFIG_PM_SLEEP | ||
1055 | /* this is needed to learn about changes made in suspended state */ | 1056 | /* this is needed to learn about changes made in suspended state */ |
1056 | static int acpi_battery_resume(struct device *dev) | 1057 | static int acpi_battery_resume(struct device *dev) |
1057 | { | 1058 | { |
@@ -1068,6 +1069,7 @@ static int acpi_battery_resume(struct device *dev) | |||
1068 | acpi_battery_update(battery); | 1069 | acpi_battery_update(battery); |
1069 | return 0; | 1070 | return 0; |
1070 | } | 1071 | } |
1072 | #endif | ||
1071 | 1073 | ||
1072 | static SIMPLE_DEV_PM_OPS(acpi_battery_pm, NULL, acpi_battery_resume); | 1074 | static SIMPLE_DEV_PM_OPS(acpi_battery_pm, NULL, acpi_battery_resume); |
1073 | 1075 | ||
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 79d4c22f7a6d..314a3b84bbc7 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
@@ -78,7 +78,9 @@ static int acpi_button_add(struct acpi_device *device); | |||
78 | static int acpi_button_remove(struct acpi_device *device, int type); | 78 | static int acpi_button_remove(struct acpi_device *device, int type); |
79 | static void acpi_button_notify(struct acpi_device *device, u32 event); | 79 | static void acpi_button_notify(struct acpi_device *device, u32 event); |
80 | 80 | ||
81 | #ifdef CONFIG_PM_SLEEP | ||
81 | static int acpi_button_resume(struct device *dev); | 82 | static int acpi_button_resume(struct device *dev); |
83 | #endif | ||
82 | static SIMPLE_DEV_PM_OPS(acpi_button_pm, NULL, acpi_button_resume); | 84 | static SIMPLE_DEV_PM_OPS(acpi_button_pm, NULL, acpi_button_resume); |
83 | 85 | ||
84 | static struct acpi_driver acpi_button_driver = { | 86 | static struct acpi_driver acpi_button_driver = { |
@@ -310,6 +312,7 @@ static void acpi_button_notify(struct acpi_device *device, u32 event) | |||
310 | } | 312 | } |
311 | } | 313 | } |
312 | 314 | ||
315 | #ifdef CONFIG_PM_SLEEP | ||
313 | static int acpi_button_resume(struct device *dev) | 316 | static int acpi_button_resume(struct device *dev) |
314 | { | 317 | { |
315 | struct acpi_device *device = to_acpi_device(dev); | 318 | struct acpi_device *device = to_acpi_device(dev); |
@@ -319,6 +322,7 @@ static int acpi_button_resume(struct device *dev) | |||
319 | return acpi_lid_send_state(device); | 322 | return acpi_lid_send_state(device); |
320 | return 0; | 323 | return 0; |
321 | } | 324 | } |
325 | #endif | ||
322 | 326 | ||
323 | static int acpi_button_add(struct acpi_device *device) | 327 | static int acpi_button_add(struct acpi_device *device) |
324 | { | 328 | { |
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c index 669d9ee80d16..bc36a476f1ab 100644 --- a/drivers/acpi/fan.c +++ b/drivers/acpi/fan.c | |||
@@ -53,8 +53,10 @@ static const struct acpi_device_id fan_device_ids[] = { | |||
53 | }; | 53 | }; |
54 | MODULE_DEVICE_TABLE(acpi, fan_device_ids); | 54 | MODULE_DEVICE_TABLE(acpi, fan_device_ids); |
55 | 55 | ||
56 | #ifdef CONFIG_PM_SLEEP | ||
56 | static int acpi_fan_suspend(struct device *dev); | 57 | static int acpi_fan_suspend(struct device *dev); |
57 | static int acpi_fan_resume(struct device *dev); | 58 | static int acpi_fan_resume(struct device *dev); |
59 | #endif | ||
58 | static SIMPLE_DEV_PM_OPS(acpi_fan_pm, acpi_fan_suspend, acpi_fan_resume); | 60 | static SIMPLE_DEV_PM_OPS(acpi_fan_pm, acpi_fan_suspend, acpi_fan_resume); |
59 | 61 | ||
60 | static struct acpi_driver acpi_fan_driver = { | 62 | static struct acpi_driver acpi_fan_driver = { |
@@ -184,6 +186,7 @@ static int acpi_fan_remove(struct acpi_device *device, int type) | |||
184 | return 0; | 186 | return 0; |
185 | } | 187 | } |
186 | 188 | ||
189 | #ifdef CONFIG_PM_SLEEP | ||
187 | static int acpi_fan_suspend(struct device *dev) | 190 | static int acpi_fan_suspend(struct device *dev) |
188 | { | 191 | { |
189 | if (!dev) | 192 | if (!dev) |
@@ -207,6 +210,7 @@ static int acpi_fan_resume(struct device *dev) | |||
207 | 210 | ||
208 | return result; | 211 | return result; |
209 | } | 212 | } |
213 | #endif | ||
210 | 214 | ||
211 | static int __init acpi_fan_init(void) | 215 | static int __init acpi_fan_init(void) |
212 | { | 216 | { |
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index e56f3be7b07d..cb31298ca684 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c | |||
@@ -237,6 +237,8 @@ acpi_parse_processor_affinity(struct acpi_subtable_header *header, | |||
237 | return 0; | 237 | return 0; |
238 | } | 238 | } |
239 | 239 | ||
240 | static int __initdata parsed_numa_memblks; | ||
241 | |||
240 | static int __init | 242 | static int __init |
241 | acpi_parse_memory_affinity(struct acpi_subtable_header * header, | 243 | acpi_parse_memory_affinity(struct acpi_subtable_header * header, |
242 | const unsigned long end) | 244 | const unsigned long end) |
@@ -250,8 +252,8 @@ acpi_parse_memory_affinity(struct acpi_subtable_header * header, | |||
250 | acpi_table_print_srat_entry(header); | 252 | acpi_table_print_srat_entry(header); |
251 | 253 | ||
252 | /* let architecture-dependent part to do it */ | 254 | /* let architecture-dependent part to do it */ |
253 | acpi_numa_memory_affinity_init(memory_affinity); | 255 | if (!acpi_numa_memory_affinity_init(memory_affinity)) |
254 | 256 | parsed_numa_memblks++; | |
255 | return 0; | 257 | return 0; |
256 | } | 258 | } |
257 | 259 | ||
@@ -304,8 +306,10 @@ int __init acpi_numa_init(void) | |||
304 | 306 | ||
305 | acpi_numa_arch_fixup(); | 307 | acpi_numa_arch_fixup(); |
306 | 308 | ||
307 | if (cnt <= 0) | 309 | if (cnt < 0) |
308 | return cnt ?: -ENOENT; | 310 | return cnt; |
311 | else if (!parsed_numa_memblks) | ||
312 | return -ENOENT; | ||
309 | return 0; | 313 | return 0; |
310 | } | 314 | } |
311 | 315 | ||
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index ec54014c321c..72a2c98bc429 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
@@ -573,8 +573,15 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device) | |||
573 | OSC_CLOCK_PWR_CAPABILITY_SUPPORT; | 573 | OSC_CLOCK_PWR_CAPABILITY_SUPPORT; |
574 | if (pci_msi_enabled()) | 574 | if (pci_msi_enabled()) |
575 | flags |= OSC_MSI_SUPPORT; | 575 | flags |= OSC_MSI_SUPPORT; |
576 | if (flags != base_flags) | 576 | if (flags != base_flags) { |
577 | acpi_pci_osc_support(root, flags); | 577 | status = acpi_pci_osc_support(root, flags); |
578 | if (ACPI_FAILURE(status)) { | ||
579 | dev_info(root->bus->bridge, "ACPI _OSC support " | ||
580 | "notification failed, disabling PCIe ASPM\n"); | ||
581 | pcie_no_aspm(); | ||
582 | flags = base_flags; | ||
583 | } | ||
584 | } | ||
578 | 585 | ||
579 | if (!pcie_ports_disabled | 586 | if (!pcie_ports_disabled |
580 | && (flags & ACPI_PCIE_REQ_SUPPORT) == ACPI_PCIE_REQ_SUPPORT) { | 587 | && (flags & ACPI_PCIE_REQ_SUPPORT) == ACPI_PCIE_REQ_SUPPORT) { |
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 215ecd097408..fc1803414629 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c | |||
@@ -67,7 +67,9 @@ static const struct acpi_device_id power_device_ids[] = { | |||
67 | }; | 67 | }; |
68 | MODULE_DEVICE_TABLE(acpi, power_device_ids); | 68 | MODULE_DEVICE_TABLE(acpi, power_device_ids); |
69 | 69 | ||
70 | #ifdef CONFIG_PM_SLEEP | ||
70 | static int acpi_power_resume(struct device *dev); | 71 | static int acpi_power_resume(struct device *dev); |
72 | #endif | ||
71 | static SIMPLE_DEV_PM_OPS(acpi_power_pm, NULL, acpi_power_resume); | 73 | static SIMPLE_DEV_PM_OPS(acpi_power_pm, NULL, acpi_power_resume); |
72 | 74 | ||
73 | static struct acpi_driver acpi_power_driver = { | 75 | static struct acpi_driver acpi_power_driver = { |
@@ -775,6 +777,7 @@ static int acpi_power_remove(struct acpi_device *device, int type) | |||
775 | return 0; | 777 | return 0; |
776 | } | 778 | } |
777 | 779 | ||
780 | #ifdef CONFIG_PM_SLEEP | ||
778 | static int acpi_power_resume(struct device *dev) | 781 | static int acpi_power_resume(struct device *dev) |
779 | { | 782 | { |
780 | int result = 0, state; | 783 | int result = 0, state; |
@@ -803,6 +806,7 @@ static int acpi_power_resume(struct device *dev) | |||
803 | 806 | ||
804 | return result; | 807 | return result; |
805 | } | 808 | } |
809 | #endif | ||
806 | 810 | ||
807 | int __init acpi_power_init(void) | 811 | int __init acpi_power_init(void) |
808 | { | 812 | { |
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index ff8e04f2fab4..bfc31cb0dd3e 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c | |||
@@ -437,7 +437,7 @@ static int acpi_cpu_soft_notify(struct notifier_block *nfb, | |||
437 | /* Normal CPU soft online event */ | 437 | /* Normal CPU soft online event */ |
438 | } else { | 438 | } else { |
439 | acpi_processor_ppc_has_changed(pr, 0); | 439 | acpi_processor_ppc_has_changed(pr, 0); |
440 | acpi_processor_cst_has_changed(pr); | 440 | acpi_processor_hotplug(pr); |
441 | acpi_processor_reevaluate_tstate(pr, action); | 441 | acpi_processor_reevaluate_tstate(pr, action); |
442 | acpi_processor_tstate_has_changed(pr); | 442 | acpi_processor_tstate_has_changed(pr); |
443 | } | 443 | } |
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index c0b9aa5faf4c..ff0740e0a9c2 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c | |||
@@ -988,6 +988,7 @@ static void acpi_sbs_rmdirs(void) | |||
988 | #endif | 988 | #endif |
989 | } | 989 | } |
990 | 990 | ||
991 | #ifdef CONFIG_PM_SLEEP | ||
991 | static int acpi_sbs_resume(struct device *dev) | 992 | static int acpi_sbs_resume(struct device *dev) |
992 | { | 993 | { |
993 | struct acpi_sbs *sbs; | 994 | struct acpi_sbs *sbs; |
@@ -997,6 +998,7 @@ static int acpi_sbs_resume(struct device *dev) | |||
997 | acpi_sbs_callback(sbs); | 998 | acpi_sbs_callback(sbs); |
998 | return 0; | 999 | return 0; |
999 | } | 1000 | } |
1001 | #endif | ||
1000 | 1002 | ||
1001 | static SIMPLE_DEV_PM_OPS(acpi_sbs_pm, NULL, acpi_sbs_resume); | 1003 | static SIMPLE_DEV_PM_OPS(acpi_sbs_pm, NULL, acpi_sbs_resume); |
1002 | 1004 | ||
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 7a7a9c929247..fdcdbb652915 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
@@ -28,36 +28,7 @@ | |||
28 | #include "internal.h" | 28 | #include "internal.h" |
29 | #include "sleep.h" | 29 | #include "sleep.h" |
30 | 30 | ||
31 | u8 wake_sleep_flags = ACPI_NO_OPTIONAL_METHODS; | ||
32 | static unsigned int gts, bfs; | ||
33 | static int set_param_wake_flag(const char *val, struct kernel_param *kp) | ||
34 | { | ||
35 | int ret = param_set_int(val, kp); | ||
36 | |||
37 | if (ret) | ||
38 | return ret; | ||
39 | |||
40 | if (kp->arg == (const char *)>s) { | ||
41 | if (gts) | ||
42 | wake_sleep_flags |= ACPI_EXECUTE_GTS; | ||
43 | else | ||
44 | wake_sleep_flags &= ~ACPI_EXECUTE_GTS; | ||
45 | } | ||
46 | if (kp->arg == (const char *)&bfs) { | ||
47 | if (bfs) | ||
48 | wake_sleep_flags |= ACPI_EXECUTE_BFS; | ||
49 | else | ||
50 | wake_sleep_flags &= ~ACPI_EXECUTE_BFS; | ||
51 | } | ||
52 | return ret; | ||
53 | } | ||
54 | module_param_call(gts, set_param_wake_flag, param_get_int, >s, 0644); | ||
55 | module_param_call(bfs, set_param_wake_flag, param_get_int, &bfs, 0644); | ||
56 | MODULE_PARM_DESC(gts, "Enable evaluation of _GTS on suspend."); | ||
57 | MODULE_PARM_DESC(bfs, "Enable evaluation of _BFS on resume".); | ||
58 | |||
59 | static u8 sleep_states[ACPI_S_STATE_COUNT]; | 31 | static u8 sleep_states[ACPI_S_STATE_COUNT]; |
60 | static bool pwr_btn_event_pending; | ||
61 | 32 | ||
62 | static void acpi_sleep_tts_switch(u32 acpi_state) | 33 | static void acpi_sleep_tts_switch(u32 acpi_state) |
63 | { | 34 | { |
@@ -110,6 +81,7 @@ static int acpi_sleep_prepare(u32 acpi_state) | |||
110 | 81 | ||
111 | #ifdef CONFIG_ACPI_SLEEP | 82 | #ifdef CONFIG_ACPI_SLEEP |
112 | static u32 acpi_target_sleep_state = ACPI_STATE_S0; | 83 | static u32 acpi_target_sleep_state = ACPI_STATE_S0; |
84 | static bool pwr_btn_event_pending; | ||
113 | 85 | ||
114 | /* | 86 | /* |
115 | * The ACPI specification wants us to save NVS memory regions during hibernation | 87 | * The ACPI specification wants us to save NVS memory regions during hibernation |
@@ -305,7 +277,7 @@ static int acpi_suspend_enter(suspend_state_t pm_state) | |||
305 | switch (acpi_state) { | 277 | switch (acpi_state) { |
306 | case ACPI_STATE_S1: | 278 | case ACPI_STATE_S1: |
307 | barrier(); | 279 | barrier(); |
308 | status = acpi_enter_sleep_state(acpi_state, wake_sleep_flags); | 280 | status = acpi_enter_sleep_state(acpi_state); |
309 | break; | 281 | break; |
310 | 282 | ||
311 | case ACPI_STATE_S3: | 283 | case ACPI_STATE_S3: |
@@ -319,8 +291,8 @@ static int acpi_suspend_enter(suspend_state_t pm_state) | |||
319 | /* This violates the spec but is required for bug compatibility. */ | 291 | /* This violates the spec but is required for bug compatibility. */ |
320 | acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1); | 292 | acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1); |
321 | 293 | ||
322 | /* Reprogram control registers and execute _BFS */ | 294 | /* Reprogram control registers */ |
323 | acpi_leave_sleep_state_prep(acpi_state, wake_sleep_flags); | 295 | acpi_leave_sleep_state_prep(acpi_state); |
324 | 296 | ||
325 | /* ACPI 3.0 specs (P62) says that it's the responsibility | 297 | /* ACPI 3.0 specs (P62) says that it's the responsibility |
326 | * of the OSPM to clear the status bit [ implying that the | 298 | * of the OSPM to clear the status bit [ implying that the |
@@ -603,9 +575,9 @@ static int acpi_hibernation_enter(void) | |||
603 | ACPI_FLUSH_CPU_CACHE(); | 575 | ACPI_FLUSH_CPU_CACHE(); |
604 | 576 | ||
605 | /* This shouldn't return. If it returns, we have a problem */ | 577 | /* This shouldn't return. If it returns, we have a problem */ |
606 | status = acpi_enter_sleep_state(ACPI_STATE_S4, wake_sleep_flags); | 578 | status = acpi_enter_sleep_state(ACPI_STATE_S4); |
607 | /* Reprogram control registers and execute _BFS */ | 579 | /* Reprogram control registers */ |
608 | acpi_leave_sleep_state_prep(ACPI_STATE_S4, wake_sleep_flags); | 580 | acpi_leave_sleep_state_prep(ACPI_STATE_S4); |
609 | 581 | ||
610 | return ACPI_SUCCESS(status) ? 0 : -EFAULT; | 582 | return ACPI_SUCCESS(status) ? 0 : -EFAULT; |
611 | } | 583 | } |
@@ -617,8 +589,8 @@ static void acpi_hibernation_leave(void) | |||
617 | * enable it here. | 589 | * enable it here. |
618 | */ | 590 | */ |
619 | acpi_enable(); | 591 | acpi_enable(); |
620 | /* Reprogram control registers and execute _BFS */ | 592 | /* Reprogram control registers */ |
621 | acpi_leave_sleep_state_prep(ACPI_STATE_S4, wake_sleep_flags); | 593 | acpi_leave_sleep_state_prep(ACPI_STATE_S4); |
622 | /* Check the hardware signature */ | 594 | /* Check the hardware signature */ |
623 | if (facs && s4_hardware_signature != facs->hardware_signature) { | 595 | if (facs && s4_hardware_signature != facs->hardware_signature) { |
624 | printk(KERN_EMERG "ACPI: Hardware changed while hibernated, " | 596 | printk(KERN_EMERG "ACPI: Hardware changed while hibernated, " |
@@ -892,33 +864,7 @@ static void acpi_power_off(void) | |||
892 | /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */ | 864 | /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */ |
893 | printk(KERN_DEBUG "%s called\n", __func__); | 865 | printk(KERN_DEBUG "%s called\n", __func__); |
894 | local_irq_disable(); | 866 | local_irq_disable(); |
895 | acpi_enter_sleep_state(ACPI_STATE_S5, wake_sleep_flags); | 867 | acpi_enter_sleep_state(ACPI_STATE_S5); |
896 | } | ||
897 | |||
898 | /* | ||
899 | * ACPI 2.0 created the optional _GTS and _BFS, | ||
900 | * but industry adoption has been neither rapid nor broad. | ||
901 | * | ||
902 | * Linux gets into trouble when it executes poorly validated | ||
903 | * paths through the BIOS, so disable _GTS and _BFS by default, | ||
904 | * but do speak up and offer the option to enable them. | ||
905 | */ | ||
906 | static void __init acpi_gts_bfs_check(void) | ||
907 | { | ||
908 | acpi_handle dummy; | ||
909 | |||
910 | if (ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, METHOD_PATHNAME__GTS, &dummy))) | ||
911 | { | ||
912 | printk(KERN_NOTICE PREFIX "BIOS offers _GTS\n"); | ||
913 | printk(KERN_NOTICE PREFIX "If \"acpi.gts=1\" improves suspend, " | ||
914 | "please notify linux-acpi@vger.kernel.org\n"); | ||
915 | } | ||
916 | if (ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, METHOD_PATHNAME__BFS, &dummy))) | ||
917 | { | ||
918 | printk(KERN_NOTICE PREFIX "BIOS offers _BFS\n"); | ||
919 | printk(KERN_NOTICE PREFIX "If \"acpi.bfs=1\" improves resume, " | ||
920 | "please notify linux-acpi@vger.kernel.org\n"); | ||
921 | } | ||
922 | } | 868 | } |
923 | 869 | ||
924 | int __init acpi_sleep_init(void) | 870 | int __init acpi_sleep_init(void) |
@@ -979,6 +925,5 @@ int __init acpi_sleep_init(void) | |||
979 | * object can also be evaluated when the system enters S5. | 925 | * object can also be evaluated when the system enters S5. |
980 | */ | 926 | */ |
981 | register_reboot_notifier(&tts_notifier); | 927 | register_reboot_notifier(&tts_notifier); |
982 | acpi_gts_bfs_check(); | ||
983 | return 0; | 928 | return 0; |
984 | } | 929 | } |
diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index 240a24400976..7c3f98ba4afe 100644 --- a/drivers/acpi/sysfs.c +++ b/drivers/acpi/sysfs.c | |||
@@ -173,7 +173,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp) | |||
173 | { | 173 | { |
174 | int result = 0; | 174 | int result = 0; |
175 | 175 | ||
176 | if (!strncmp(val, "enable", strlen("enable"))) { | 176 | if (!strncmp(val, "enable", sizeof("enable") - 1)) { |
177 | result = acpi_debug_trace(trace_method_name, trace_debug_level, | 177 | result = acpi_debug_trace(trace_method_name, trace_debug_level, |
178 | trace_debug_layer, 0); | 178 | trace_debug_layer, 0); |
179 | if (result) | 179 | if (result) |
@@ -181,7 +181,7 @@ static int param_set_trace_state(const char *val, struct kernel_param *kp) | |||
181 | goto exit; | 181 | goto exit; |
182 | } | 182 | } |
183 | 183 | ||
184 | if (!strncmp(val, "disable", strlen("disable"))) { | 184 | if (!strncmp(val, "disable", sizeof("disable") - 1)) { |
185 | int name = 0; | 185 | int name = 0; |
186 | result = acpi_debug_trace((char *)&name, trace_debug_level, | 186 | result = acpi_debug_trace((char *)&name, trace_debug_level, |
187 | trace_debug_layer, 0); | 187 | trace_debug_layer, 0); |
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 9fe90e9fecb5..edda74a43406 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -106,7 +106,9 @@ static const struct acpi_device_id thermal_device_ids[] = { | |||
106 | }; | 106 | }; |
107 | MODULE_DEVICE_TABLE(acpi, thermal_device_ids); | 107 | MODULE_DEVICE_TABLE(acpi, thermal_device_ids); |
108 | 108 | ||
109 | #ifdef CONFIG_PM_SLEEP | ||
109 | static int acpi_thermal_resume(struct device *dev); | 110 | static int acpi_thermal_resume(struct device *dev); |
111 | #endif | ||
110 | static SIMPLE_DEV_PM_OPS(acpi_thermal_pm, NULL, acpi_thermal_resume); | 112 | static SIMPLE_DEV_PM_OPS(acpi_thermal_pm, NULL, acpi_thermal_resume); |
111 | 113 | ||
112 | static struct acpi_driver acpi_thermal_driver = { | 114 | static struct acpi_driver acpi_thermal_driver = { |
@@ -1041,6 +1043,7 @@ static int acpi_thermal_remove(struct acpi_device *device, int type) | |||
1041 | return 0; | 1043 | return 0; |
1042 | } | 1044 | } |
1043 | 1045 | ||
1046 | #ifdef CONFIG_PM_SLEEP | ||
1044 | static int acpi_thermal_resume(struct device *dev) | 1047 | static int acpi_thermal_resume(struct device *dev) |
1045 | { | 1048 | { |
1046 | struct acpi_thermal *tz; | 1049 | struct acpi_thermal *tz; |
@@ -1075,6 +1078,7 @@ static int acpi_thermal_resume(struct device *dev) | |||
1075 | 1078 | ||
1076 | return AE_OK; | 1079 | return AE_OK; |
1077 | } | 1080 | } |
1081 | #endif | ||
1078 | 1082 | ||
1079 | static int thermal_act(const struct dmi_system_id *d) { | 1083 | static int thermal_act(const struct dmi_system_id *d) { |
1080 | 1084 | ||