diff options
| author | Nate Lawson <njl@FreeBSD.org> | 2004-04-14 17:48:33 +0000 |
|---|---|---|
| committer | Nate Lawson <njl@FreeBSD.org> | 2004-04-14 17:48:33 +0000 |
| commit | 865b8d0bfd7d7a8d70728e902d89d578b899a3bf (patch) | |
| tree | 563021ef23110479701f77f5878a0c6d211f7dc8 /sys | |
| parent | dfd36c130bd340854df2574209bbbbc3a128d9e3 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/acpica/acpi.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 8846f82d7d27e..7b796cd4080b4 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -76,12 +76,6 @@ static struct cdevsw acpi_cdevsw = { .d_name = "acpi", }; -static const char* sleep_state_names[] = { - "S0", "S1", "S2", "S3", "S4", "S5", "NONE"}; - -/* this has to be static, as the softc is gone when we need it */ -static int acpi_off_state = ACPI_STATE_S5; - #if __FreeBSD_version >= 500000 struct mtx acpi_mutex; #endif @@ -188,6 +182,9 @@ static devclass_t acpi_devclass; DRIVER_MODULE(acpi, nexus, acpi_driver, acpi_devclass, acpi_modevent, 0); MODULE_VERSION(acpi, 1); +static const char* sleep_state_names[] = { + "S0", "S1", "S2", "S3", "S4", "S5", "NONE"}; + SYSCTL_NODE(_debug, OID_AUTO, acpi, CTLFLAG_RW, NULL, "ACPI debugging"); static char acpi_ca_version[12]; SYSCTL_STRING(_debug_acpi, OID_AUTO, acpi_ca_version, CTLFLAG_RD, @@ -1189,14 +1186,14 @@ acpi_shutdown_poweroff(void *arg) if (PCPU_GET(cpuid) != 0) return; - status = AcpiEnterSleepStatePrep(acpi_off_state); + status = AcpiEnterSleepStatePrep(ACPI_STATE_S5); if (ACPI_FAILURE(status)) { printf("AcpiEnterSleepStatePrep failed - %s\n", AcpiFormatException(status)); return; } ACPI_DISABLE_IRQS(); - status = AcpiEnterSleepState(acpi_off_state); + status = AcpiEnterSleepState(ACPI_STATE_S5); if (ACPI_FAILURE(status)) { printf("ACPI power-off failed - %s\n", AcpiFormatException(status)); } else { |
