* Actually call prepare_sleep_state() instead of calling enter_sleep_state()
  twice...
* Commented out disabling interrupts when calling enter_sleep_state(), as our
  ACPI modules would then crash (needs memory & uses sems with interrupts
  disabled). This way, it at least works on some hardware, including emulators
  (as before).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28004 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-10-12 19:59:51 +00:00
parent 61e7172dca
commit 4a4abaf25f

View File

@ -108,11 +108,11 @@ acpi_shutdown(void)
if (get_module(B_ACPI_MODULE_NAME, (module_info**)&acpi) != B_OK)
return B_NOT_SUPPORTED;
status_t status = acpi->enter_sleep_state(ACPI_POWER_STATE_OFF);
status_t status = acpi->prepare_sleep_state(ACPI_POWER_STATE_OFF, NULL, 0);
if (status == B_OK) {
cpu_status state = disable_interrupts();
//cpu_status state = disable_interrupts();
status = acpi->enter_sleep_state(ACPI_POWER_STATE_OFF);
restore_interrupts(state);
//restore_interrupts(state);
}
put_module(B_ACPI_MODULE_NAME);