diff options
author | njl <njl@FreeBSD.org> | 2004-02-19 18:16:34 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2004-02-19 18:16:34 +0000 |
commit | 84e7bd5bf900eda95ba93e398b8d856681a1bd83 (patch) | |
tree | 5e01ae9b562a5527b14630ea457eaf34a58160c3 /sys/dev | |
parent | db515f3a33b75256d616d05de0ffa2916c8c6f22 (diff) | |
download | FreeBSD-src-84e7bd5bf900eda95ba93e398b8d856681a1bd83.zip FreeBSD-src-84e7bd5bf900eda95ba93e398b8d856681a1bd83.tar.gz |
Do not remove the fixed handlers. Several systems (e.g., ASUS) only
return events on the fixed handler even after defining a duplicate in the
AML. While this violates the spec, hopefully we can get by with leaving
both installed.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/acpica/acpi_button.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/sys/dev/acpica/acpi_button.c b/sys/dev/acpica/acpi_button.c index 2bfb570..9d95ba1 100644 --- a/sys/dev/acpica/acpi_button.c +++ b/sys/dev/acpica/acpi_button.c @@ -130,7 +130,11 @@ acpi_button_attach(device_t dev) event = (sc->button_type == ACPI_SLEEP_BUTTON) ? ACPI_EVENT_SLEEP_BUTTON : ACPI_EVENT_POWER_BUTTON; - /* Install the appropriate new handler. */ + /* + * Install the new handler. We could remove any fixed handlers added + * from the FADT once we have a duplicate from the AML but some systems + * only return events on one or the other so we have to keep both. + */ if (sc->fixed) { AcpiClearEvent(event); status = AcpiInstallFixedEventHandler(event, @@ -146,16 +150,6 @@ acpi_button_attach(device_t dev) } acpi_device_enable_wake_capability(sc->button_handle, 1); - /* - * If we have fixed buttons defined in the FADT, remove them now that - * we have found one in the AML. Some systems define buttons both ways - * but only deliver events to the AML object. - */ - if (event == ACPI_EVENT_POWER_BUTTON && AcpiGbl_FADT->PwrButton == 0) - AcpiRemoveFixedEventHandler(event, acpi_event_power_button_sleep); - if (event == ACPI_EVENT_SLEEP_BUTTON && AcpiGbl_FADT->SleepButton == 0) - AcpiRemoveFixedEventHandler(event, acpi_event_sleep_button_sleep); - return_VALUE (0); } |