patch-2.4.26 linux-2.4.26/drivers/acpi/events/evxfevnt.c
Next file: linux-2.4.26/drivers/acpi/executer/exconvrt.c
Previous file: linux-2.4.26/drivers/acpi/events/evmisc.c
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
2004-04-14 06:05:28.000000000 -0700
- Orig file:
linux-2.4.25/drivers/acpi/events/evxfevnt.c
- Orig date:
2004-02-18 05:36:31.000000000 -0800
diff -urN linux-2.4.25/drivers/acpi/events/evxfevnt.c linux-2.4.26/drivers/acpi/events/evxfevnt.c
@@ -247,16 +247,29 @@
goto unlock_and_exit;
}
- /* Enable the requested GPE number */
-
- status = acpi_hw_enable_gpe (gpe_event_info);
- if (ACPI_FAILURE (status)) {
- goto unlock_and_exit;
- }
+ /* Check for Wake vs Runtime GPE */
if (flags & ACPI_EVENT_WAKE_ENABLE) {
+ /* Ensure the requested wake GPE is disabled */
+
+ status = acpi_hw_disable_gpe (gpe_event_info);
+ if (ACPI_FAILURE (status)) {
+ goto unlock_and_exit;
+ }
+
+ /* Defer Enable of Wake GPE until sleep time */
+
acpi_hw_enable_gpe_for_wakeup (gpe_event_info);
}
+ else {
+ /* Enable the requested runtime GPE */
+
+ status = acpi_hw_enable_gpe (gpe_event_info);
+ if (ACPI_FAILURE (status)) {
+ goto unlock_and_exit;
+ }
+ }
+
unlock_and_exit:
if (flags & ACPI_NOT_ISR) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)