diff options
author | Nate Lawson <njl@FreeBSD.org> | 2004-06-05 07:25:58 +0000 |
---|---|---|
committer | Nate Lawson <njl@FreeBSD.org> | 2004-06-05 07:25:58 +0000 |
commit | 169b539a33e1f100a90e774ee415981cac0c9803 (patch) | |
tree | c60466b13e20c7f7b8985de7660c090b3b8468ea | |
parent | a2afe45a8a9dec371b2ec55fe6e62f2a3c23fda0 (diff) | |
download | src-169b539a33e1f100a90e774ee415981cac0c9803.tar.gz src-169b539a33e1f100a90e774ee415981cac0c9803.zip |
Notes
-rw-r--r-- | sys/dev/acpica/acpi.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 0bebf284c704..7b35d6396f94 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -102,6 +102,7 @@ static int acpi_modevent(struct module *mod, int event, void *junk); static void acpi_identify(driver_t *driver, device_t parent); static int acpi_probe(device_t dev); static int acpi_attach(device_t dev); +static int acpi_shutdown(device_t dev); static void acpi_quirks_set(void); static device_t acpi_add_child(device_t bus, int order, const char *name, int unit); @@ -151,8 +152,8 @@ static device_method_t acpi_methods[] = { DEVMETHOD(device_identify, acpi_identify), DEVMETHOD(device_probe, acpi_probe), DEVMETHOD(device_attach, acpi_attach), + DEVMETHOD(device_shutdown, acpi_shutdown), DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_resume, bus_generic_resume), @@ -612,6 +613,15 @@ acpi_attach(device_t dev) return_VALUE (error); } +static int +acpi_shutdown(device_t dev) +{ + + /* Disable all wake GPEs not appropriate for reboot/poweroff. */ + acpi_wake_limit_walk(ACPI_STATE_S5); + return (0); +} + static void acpi_quirks_set() { @@ -1153,9 +1163,6 @@ acpi_shutdown_pre_sync(void *arg, int howto) ACPI_ASSERTLOCK; - /* Disable all wake GPEs not appropriate for this state. */ - acpi_wake_limit_walk(ACPI_STATE_S5); - /* * Disable all ACPI events before soft off, otherwise the system * will be turned on again on some laptops. |