summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-04-14 17:48:33 +0000
committernjl <njl@FreeBSD.org>2004-04-14 17:48:33 +0000
commit973a760dd64e43a3ae275e777ab2433bfea4afe5 (patch)
tree563021ef23110479701f77f5878a0c6d211f7dc8
parent37b624bbcab8c0f91cddf7438182b741dfbff0de (diff)
downloadFreeBSD-src-973a760dd64e43a3ae275e777ab2433bfea4afe5.zip
FreeBSD-src-973a760dd64e43a3ae275e777ab2433bfea4afe5.tar.gz
Remove a non-variable static and move other static variables to the same
location.
-rw-r--r--sys/dev/acpica/acpi.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 8846f82..7b796cd 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 {
OpenPOWER on IntegriCloud