diff options
| -rw-r--r-- | drivers/acpi/acpica/hwesleep.c | 22 | ||||
| -rw-r--r-- | drivers/acpi/acpica/hwsleep.c | 10 | ||||
| -rw-r--r-- | drivers/acpi/acpica/hwxfsleep.c | 5 | ||||
| -rw-r--r-- | drivers/acpi/acpica/nsdumpdv.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/sleep.c | 4 | ||||
| -rw-r--r-- | include/acpi/acnames.h | 12 |
6 files changed, 28 insertions, 27 deletions
diff --git a/drivers/acpi/acpica/hwesleep.c b/drivers/acpi/acpica/hwesleep.c index 9e44c6c767e6..6cbc4e10bfa8 100644 --- a/drivers/acpi/acpica/hwesleep.c +++ b/drivers/acpi/acpica/hwesleep.c | |||
| @@ -59,7 +59,7 @@ MODULE_PARM_DESC(bfs, "Enable evaluation of _BFS on resume".); | |||
| 59 | * | 59 | * |
| 60 | * FUNCTION: acpi_hw_execute_sleep_method | 60 | * FUNCTION: acpi_hw_execute_sleep_method |
| 61 | * | 61 | * |
| 62 | * PARAMETERS: method_name - Pathname of method to execute | 62 | * PARAMETERS: method_pathname - Pathname of method to execute |
| 63 | * integer_argument - Argument to pass to the method | 63 | * integer_argument - Argument to pass to the method |
| 64 | * | 64 | * |
| 65 | * RETURN: None | 65 | * RETURN: None |
| @@ -68,7 +68,7 @@ MODULE_PARM_DESC(bfs, "Enable evaluation of _BFS on resume".); | |||
| 68 | * and no return value. | 68 | * and no return value. |
| 69 | * | 69 | * |
| 70 | ******************************************************************************/ | 70 | ******************************************************************************/ |
| 71 | void acpi_hw_execute_sleep_method(char *method_name, u32 integer_argument) | 71 | void acpi_hw_execute_sleep_method(char *method_pathname, u32 integer_argument) |
| 72 | { | 72 | { |
| 73 | struct acpi_object_list arg_list; | 73 | struct acpi_object_list arg_list; |
| 74 | union acpi_object arg; | 74 | union acpi_object arg; |
| @@ -76,10 +76,10 @@ void acpi_hw_execute_sleep_method(char *method_name, u32 integer_argument) | |||
| 76 | 76 | ||
| 77 | ACPI_FUNCTION_TRACE(hw_execute_sleep_method); | 77 | ACPI_FUNCTION_TRACE(hw_execute_sleep_method); |
| 78 | 78 | ||
| 79 | if (!ACPI_STRCMP(METHOD_NAME__GTS, method_name) && !gts) | 79 | if (!ACPI_STRCMP(METHOD_PATHNAME__GTS, method_pathname) && !gts) |
| 80 | return_VOID; | 80 | return_VOID; |
| 81 | 81 | ||
| 82 | if (!ACPI_STRCMP(METHOD_NAME__BFS, method_name) && !bfs) | 82 | if (!ACPI_STRCMP(METHOD_PATHNAME__BFS, method_pathname) && !bfs) |
| 83 | return_VOID; | 83 | return_VOID; |
| 84 | 84 | ||
| 85 | /* One argument, integer_argument; No return value expected */ | 85 | /* One argument, integer_argument; No return value expected */ |
| @@ -89,10 +89,10 @@ void acpi_hw_execute_sleep_method(char *method_name, u32 integer_argument) | |||
| 89 | arg.type = ACPI_TYPE_INTEGER; | 89 | arg.type = ACPI_TYPE_INTEGER; |
| 90 | arg.integer.value = (u64)integer_argument; | 90 | arg.integer.value = (u64)integer_argument; |
| 91 | 91 | ||
| 92 | status = acpi_evaluate_object(NULL, method_name, &arg_list, NULL); | 92 | status = acpi_evaluate_object(NULL, method_pathname, &arg_list, NULL); |
| 93 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { | 93 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { |
| 94 | ACPI_EXCEPTION((AE_INFO, status, "While executing method %s", | 94 | ACPI_EXCEPTION((AE_INFO, status, "While executing method %s", |
| 95 | method_name)); | 95 | method_pathname)); |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | return_VOID; | 98 | return_VOID; |
| @@ -138,7 +138,7 @@ acpi_status acpi_hw_extended_sleep(u8 sleep_state) | |||
| 138 | 138 | ||
| 139 | /* Execute the _GTS method (Going To Sleep) */ | 139 | /* Execute the _GTS method (Going To Sleep) */ |
| 140 | 140 | ||
| 141 | acpi_hw_execute_sleep_method(METHOD_NAME__GTS, sleep_state); | 141 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__GTS, sleep_state); |
| 142 | 142 | ||
| 143 | /* Flush caches, as per ACPI specification */ | 143 | /* Flush caches, as per ACPI specification */ |
| 144 | 144 | ||
| @@ -208,7 +208,7 @@ acpi_status acpi_hw_extended_wake_prep(u8 sleep_state) | |||
| 208 | &acpi_gbl_FADT.sleep_control); | 208 | &acpi_gbl_FADT.sleep_control); |
| 209 | } | 209 | } |
| 210 | 210 | ||
| 211 | acpi_hw_execute_sleep_method(METHOD_NAME__BFS, sleep_state); | 211 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__BFS, sleep_state); |
| 212 | return_ACPI_STATUS(AE_OK); | 212 | return_ACPI_STATUS(AE_OK); |
| 213 | } | 213 | } |
| 214 | 214 | ||
| @@ -235,8 +235,8 @@ acpi_status acpi_hw_extended_wake(u8 sleep_state) | |||
| 235 | 235 | ||
| 236 | /* Execute the wake methods */ | 236 | /* Execute the wake methods */ |
| 237 | 237 | ||
| 238 | acpi_hw_execute_sleep_method(METHOD_NAME__SST, ACPI_SST_WAKING); | 238 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, ACPI_SST_WAKING); |
| 239 | acpi_hw_execute_sleep_method(METHOD_NAME__WAK, sleep_state); | 239 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__WAK, sleep_state); |
| 240 | 240 | ||
| 241 | /* | 241 | /* |
| 242 | * Some BIOS code assumes that WAK_STS will be cleared on resume | 242 | * Some BIOS code assumes that WAK_STS will be cleared on resume |
| @@ -246,6 +246,6 @@ acpi_status acpi_hw_extended_wake(u8 sleep_state) | |||
| 246 | (void)acpi_write(ACPI_X_WAKE_STATUS, &acpi_gbl_FADT.sleep_status); | 246 | (void)acpi_write(ACPI_X_WAKE_STATUS, &acpi_gbl_FADT.sleep_status); |
| 247 | acpi_gbl_system_awake_and_running = TRUE; | 247 | acpi_gbl_system_awake_and_running = TRUE; |
| 248 | 248 | ||
| 249 | acpi_hw_execute_sleep_method(METHOD_NAME__SST, ACPI_SST_WORKING); | 249 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, ACPI_SST_WORKING); |
| 250 | return_ACPI_STATUS(AE_OK); | 250 | return_ACPI_STATUS(AE_OK); |
| 251 | } | 251 | } |
diff --git a/drivers/acpi/acpica/hwsleep.c b/drivers/acpi/acpica/hwsleep.c index b96d41bbc64e..aba36349ba4d 100644 --- a/drivers/acpi/acpica/hwsleep.c +++ b/drivers/acpi/acpica/hwsleep.c | |||
| @@ -123,7 +123,7 @@ acpi_status acpi_hw_legacy_sleep(u8 sleep_state) | |||
| 123 | 123 | ||
| 124 | /* Execute the _GTS method (Going To Sleep) */ | 124 | /* Execute the _GTS method (Going To Sleep) */ |
| 125 | 125 | ||
| 126 | acpi_hw_execute_sleep_method(METHOD_NAME__GTS, sleep_state); | 126 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__GTS, sleep_state); |
| 127 | 127 | ||
| 128 | /* Get current value of PM1A control */ | 128 | /* Get current value of PM1A control */ |
| 129 | 129 | ||
| @@ -279,7 +279,7 @@ acpi_status acpi_hw_legacy_wake_prep(u8 sleep_state) | |||
| 279 | } | 279 | } |
| 280 | } | 280 | } |
| 281 | 281 | ||
| 282 | acpi_hw_execute_sleep_method(METHOD_NAME__BFS, sleep_state); | 282 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__BFS, sleep_state); |
| 283 | return_ACPI_STATUS(status); | 283 | return_ACPI_STATUS(status); |
| 284 | } | 284 | } |
| 285 | 285 | ||
| @@ -305,7 +305,7 @@ acpi_status acpi_hw_legacy_wake(u8 sleep_state) | |||
| 305 | /* Ensure enter_sleep_state_prep -> enter_sleep_state ordering */ | 305 | /* Ensure enter_sleep_state_prep -> enter_sleep_state ordering */ |
| 306 | 306 | ||
| 307 | acpi_gbl_sleep_type_a = ACPI_SLEEP_TYPE_INVALID; | 307 | acpi_gbl_sleep_type_a = ACPI_SLEEP_TYPE_INVALID; |
| 308 | acpi_hw_execute_sleep_method(METHOD_NAME__SST, ACPI_SST_WAKING); | 308 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, ACPI_SST_WAKING); |
| 309 | 309 | ||
| 310 | /* | 310 | /* |
| 311 | * GPEs must be enabled before _WAK is called as GPEs | 311 | * GPEs must be enabled before _WAK is called as GPEs |
| @@ -329,7 +329,7 @@ acpi_status acpi_hw_legacy_wake(u8 sleep_state) | |||
| 329 | * Now we can execute _WAK, etc. Some machines require that the GPEs | 329 | * Now we can execute _WAK, etc. Some machines require that the GPEs |
| 330 | * are enabled before the wake methods are executed. | 330 | * are enabled before the wake methods are executed. |
| 331 | */ | 331 | */ |
| 332 | acpi_hw_execute_sleep_method(METHOD_NAME__WAK, sleep_state); | 332 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__WAK, sleep_state); |
| 333 | 333 | ||
| 334 | /* | 334 | /* |
| 335 | * Some BIOS code assumes that WAK_STS will be cleared on resume | 335 | * Some BIOS code assumes that WAK_STS will be cleared on resume |
| @@ -361,7 +361,7 @@ acpi_status acpi_hw_legacy_wake(u8 sleep_state) | |||
| 361 | return_ACPI_STATUS(status); | 361 | return_ACPI_STATUS(status); |
| 362 | } | 362 | } |
| 363 | 363 | ||
| 364 | acpi_hw_execute_sleep_method(METHOD_NAME__SST, ACPI_SST_WORKING); | 364 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, ACPI_SST_WORKING); |
| 365 | return_ACPI_STATUS(status); | 365 | return_ACPI_STATUS(status); |
| 366 | } | 366 | } |
| 367 | 367 | ||
diff --git a/drivers/acpi/acpica/hwxfsleep.c b/drivers/acpi/acpica/hwxfsleep.c index b711f97c9a87..cf0168e538d9 100644 --- a/drivers/acpi/acpica/hwxfsleep.c +++ b/drivers/acpi/acpica/hwxfsleep.c | |||
| @@ -306,7 +306,8 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) | |||
| 306 | arg.type = ACPI_TYPE_INTEGER; | 306 | arg.type = ACPI_TYPE_INTEGER; |
| 307 | arg.integer.value = sleep_state; | 307 | arg.integer.value = sleep_state; |
| 308 | 308 | ||
| 309 | status = acpi_evaluate_object(NULL, METHOD_NAME__PTS, &arg_list, NULL); | 309 | status = |
| 310 | acpi_evaluate_object(NULL, METHOD_PATHNAME__PTS, &arg_list, NULL); | ||
| 310 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { | 311 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { |
| 311 | return_ACPI_STATUS(status); | 312 | return_ACPI_STATUS(status); |
| 312 | } | 313 | } |
| @@ -337,7 +338,7 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) | |||
| 337 | * Set the system indicators to show the desired sleep state. | 338 | * Set the system indicators to show the desired sleep state. |
| 338 | * _SST is an optional method (return no error if not found) | 339 | * _SST is an optional method (return no error if not found) |
| 339 | */ | 340 | */ |
| 340 | acpi_hw_execute_sleep_method(METHOD_NAME__SST, sst_value); | 341 | acpi_hw_execute_sleep_method(METHOD_PATHNAME__SST, sst_value); |
| 341 | return_ACPI_STATUS(AE_OK); | 342 | return_ACPI_STATUS(AE_OK); |
| 342 | } | 343 | } |
| 343 | 344 | ||
diff --git a/drivers/acpi/acpica/nsdumpdv.c b/drivers/acpi/acpica/nsdumpdv.c index 30ea5bc53a78..3b5acb0eb406 100644 --- a/drivers/acpi/acpica/nsdumpdv.c +++ b/drivers/acpi/acpica/nsdumpdv.c | |||
| @@ -121,7 +121,7 @@ void acpi_ns_dump_root_devices(void) | |||
| 121 | return; | 121 | return; |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | status = acpi_get_handle(NULL, ACPI_NS_SYSTEM_BUS, &sys_bus_handle); | 124 | status = acpi_get_handle(NULL, METHOD_NAME__SB_, &sys_bus_handle); |
| 125 | if (ACPI_FAILURE(status)) { | 125 | if (ACPI_FAILURE(status)) { |
| 126 | return; | 126 | return; |
| 127 | } | 127 | } |
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index ca191ff97844..4fda549fa599 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c | |||
| @@ -788,13 +788,13 @@ static void __init acpi_gts_bfs_check(void) | |||
| 788 | { | 788 | { |
| 789 | acpi_handle dummy; | 789 | acpi_handle dummy; |
| 790 | 790 | ||
| 791 | if (ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, METHOD_NAME__GTS, &dummy))) | 791 | if (ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, METHOD_PATHNAME__GTS, &dummy))) |
| 792 | { | 792 | { |
| 793 | printk(KERN_NOTICE PREFIX "BIOS offers _GTS\n"); | 793 | printk(KERN_NOTICE PREFIX "BIOS offers _GTS\n"); |
| 794 | printk(KERN_NOTICE PREFIX "If \"acpi.gts=1\" improves suspend, " | 794 | printk(KERN_NOTICE PREFIX "If \"acpi.gts=1\" improves suspend, " |
| 795 | "please notify linux-acpi@vger.kernel.org\n"); | 795 | "please notify linux-acpi@vger.kernel.org\n"); |
| 796 | } | 796 | } |
| 797 | if (ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, METHOD_NAME__BFS, &dummy))) | 797 | if (ACPI_SUCCESS(acpi_get_handle(ACPI_ROOT_OBJECT, METHOD_PATHNAME__BFS, &dummy))) |
| 798 | { | 798 | { |
| 799 | printk(KERN_NOTICE PREFIX "BIOS offers _BFS\n"); | 799 | printk(KERN_NOTICE PREFIX "BIOS offers _BFS\n"); |
| 800 | printk(KERN_NOTICE PREFIX "If \"acpi.bfs=1\" improves resume, " | 800 | printk(KERN_NOTICE PREFIX "If \"acpi.bfs=1\" improves resume, " |
diff --git a/include/acpi/acnames.h b/include/acpi/acnames.h index 5b5af0d30a97..38f508816e4a 100644 --- a/include/acpi/acnames.h +++ b/include/acpi/acnames.h | |||
| @@ -46,6 +46,7 @@ | |||
| 46 | 46 | ||
| 47 | /* Method names - these methods can appear anywhere in the namespace */ | 47 | /* Method names - these methods can appear anywhere in the namespace */ |
| 48 | 48 | ||
| 49 | #define METHOD_NAME__SB_ "_SB_" | ||
| 49 | #define METHOD_NAME__HID "_HID" | 50 | #define METHOD_NAME__HID "_HID" |
| 50 | #define METHOD_NAME__CID "_CID" | 51 | #define METHOD_NAME__CID "_CID" |
| 51 | #define METHOD_NAME__UID "_UID" | 52 | #define METHOD_NAME__UID "_UID" |
| @@ -64,11 +65,11 @@ | |||
| 64 | 65 | ||
| 65 | /* Method names - these methods must appear at the namespace root */ | 66 | /* Method names - these methods must appear at the namespace root */ |
| 66 | 67 | ||
| 67 | #define METHOD_NAME__BFS "\\_BFS" | 68 | #define METHOD_PATHNAME__BFS "\\_BFS" |
| 68 | #define METHOD_NAME__GTS "\\_GTS" | 69 | #define METHOD_PATHNAME__GTS "\\_GTS" |
| 69 | #define METHOD_NAME__PTS "\\_PTS" | 70 | #define METHOD_PATHNAME__PTS "\\_PTS" |
| 70 | #define METHOD_NAME__SST "\\_SI._SST" | 71 | #define METHOD_PATHNAME__SST "\\_SI._SST" |
| 71 | #define METHOD_NAME__WAK "\\_WAK" | 72 | #define METHOD_PATHNAME__WAK "\\_WAK" |
| 72 | 73 | ||
| 73 | /* Definitions of the predefined namespace names */ | 74 | /* Definitions of the predefined namespace names */ |
| 74 | 75 | ||
| @@ -79,6 +80,5 @@ | |||
| 79 | #define ACPI_PREFIX_LOWER (u32) 0x69706361 /* "acpi" */ | 80 | #define ACPI_PREFIX_LOWER (u32) 0x69706361 /* "acpi" */ |
| 80 | 81 | ||
| 81 | #define ACPI_NS_ROOT_PATH "\\" | 82 | #define ACPI_NS_ROOT_PATH "\\" |
| 82 | #define ACPI_NS_SYSTEM_BUS "_SB_" | ||
| 83 | 83 | ||
| 84 | #endif /* __ACNAMES_H__ */ | 84 | #endif /* __ACNAMES_H__ */ |
