===================================================================
@@ -617,6 +617,13 @@ acpi_install_gpe_handler(acpi_handle gpe
handler->context = context;
handler->method_node = gpe_event_info->dispatch.method_node;
+ /* Disable the GPE before installing the handler */
+
+ status = acpi_ev_disable_gpe(gpe_event_info);
+ if (ACPI_FAILURE(status)) {
+ goto unlock_and_exit;
+ }
+
/* Install the handler */
flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
@@ -709,6 +716,13 @@ acpi_remove_gpe_handler(acpi_handle gpe_
return_ACPI_STATUS(status);
}
+ /* Disable the GPE before removing the handler */
+
+ status = acpi_ev_disable_gpe(gpe_event_info);
+ if (ACPI_FAILURE(status)) {
+ goto unlock_and_exit;
+ }
+
/* Remove the handler */
flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
===================================================================
@@ -335,6 +335,10 @@ acpi_ev_save_method_info(acpi_handle obj
gpe_event_info->dispatch.method_node =
(struct acpi_namespace_node *)obj_handle;
+ /* Update enable mask, but don't enable the HW GPE as of yet */
+
+ status = acpi_ev_enable_gpe(gpe_event_info, FALSE);
+
ACPI_DEBUG_PRINT((ACPI_DB_LOAD,
"Registered GPE method %s as GPE number 0x%.2X\n",
name, gpe_number));