diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpica/dbinput.c | 3 | ||||
-rw-r--r-- | drivers/acpi/acpica/utinit.c | 13 | ||||
-rw-r--r-- | drivers/acpi/acpica/utxface.c | 13 |
3 files changed, 15 insertions, 14 deletions
diff --git a/drivers/acpi/acpica/dbinput.c b/drivers/acpi/acpica/dbinput.c index f8cddd682af2..0480254437f1 100644 --- a/drivers/acpi/acpica/dbinput.c +++ b/drivers/acpi/acpica/dbinput.c @@ -1074,6 +1074,7 @@ acpi_db_command_dispatch(char *input_buffer, * re-creating the semaphores! */ + acpi_gbl_db_terminate_loop = TRUE; /* acpi_initialize (NULL); */ break; @@ -1151,7 +1152,7 @@ void ACPI_SYSTEM_XFACE acpi_db_execute_thread(void *context) acpi_status status = AE_OK; acpi_status Mstatus; - while (status != AE_CTRL_TERMINATE) { + while (status != AE_CTRL_TERMINATE && !acpi_gbl_db_terminate_loop) { acpi_gbl_method_executing = FALSE; acpi_gbl_step_to_next_call = FALSE; diff --git a/drivers/acpi/acpica/utinit.c b/drivers/acpi/acpica/utinit.c index d8699df8914c..ccd0745f011e 100644 --- a/drivers/acpi/acpica/utinit.c +++ b/drivers/acpi/acpica/utinit.c @@ -282,6 +282,19 @@ void acpi_ut_subsystem_shutdown(void) { ACPI_FUNCTION_TRACE(ut_subsystem_shutdown); + /* Just exit if subsystem is already shutdown */ + + if (acpi_gbl_shutdown) { + ACPI_ERROR((AE_INFO, "ACPI Subsystem is already terminated")); + return_VOID; + } + + /* Subsystem appears active, go ahead and shut it down */ + + acpi_gbl_shutdown = TRUE; + acpi_gbl_startup_flags = 0; + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Shutting down ACPI Subsystem\n")); + #ifndef ACPI_ASL_COMPILER /* Close the acpi_event Handling */ diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c index f183daf938b7..a6b0eb034fc0 100644 --- a/drivers/acpi/acpica/utxface.c +++ b/drivers/acpi/acpica/utxface.c @@ -67,19 +67,6 @@ acpi_status __init acpi_terminate(void) ACPI_FUNCTION_TRACE(acpi_terminate); - /* Just exit if subsystem is already shutdown */ - - if (acpi_gbl_shutdown) { - ACPI_ERROR((AE_INFO, "ACPI Subsystem is already terminated")); - return_ACPI_STATUS(AE_OK); - } - - /* Subsystem appears active, go ahead and shut it down */ - - acpi_gbl_shutdown = TRUE; - acpi_gbl_startup_flags = 0; - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Shutting down ACPI Subsystem\n")); - /* Shutdown and free all resources */ acpi_ut_subsystem_shutdown(); |