aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Lawson <njl@FreeBSD.org>2004-02-19 18:16:34 +0000
committerNate Lawson <njl@FreeBSD.org>2004-02-19 18:16:34 +0000
commitbb949efb953c5b9e9e79e58157915505c4504f66 (patch)
tree5e01ae9b562a5527b14630ea457eaf34a58160c3
parent4977f29fd03540ee682e6bbd61781b412d29c825 (diff)
Notes
-rw-r--r--sys/dev/acpica/acpi_button.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/sys/dev/acpica/acpi_button.c b/sys/dev/acpica/acpi_button.c
index 2bfb570f27d4..9d95ba1ad273 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);
}