[ACPICA]
[reactos.git] / reactos / drivers / bus / acpi / acpica / hardware / hwgpe.c
index c532689..1ab6965 100644 (file)
@@ -169,6 +169,8 @@ AcpiHwGetGpeRegisterBit (
  * RETURN:      Status
  *
  * DESCRIPTION: Enable or disable a single GPE in the parent enable register.
+ *              The EnableMask field of the involved GPE register must be
+ *              updated by the caller if necessary.
  *
  ******************************************************************************/
 
@@ -205,7 +207,7 @@ AcpiHwLowSetGpe (
     /* Set or clear just the bit that corresponds to this GPE */
 
     RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo);
-    switch (Action & ~ACPI_GPE_SAVE_MASK)
+    switch (Action)
     {
     case ACPI_GPE_CONDITIONAL_ENABLE:
 
@@ -237,10 +239,6 @@ AcpiHwLowSetGpe (
     /* Write the updated enable mask */
 
     Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress);
-    if (ACPI_SUCCESS (Status) && (Action & ACPI_GPE_SAVE_MASK))
-    {
-        GpeRegisterInfo->EnableMask = (UINT8) EnableMask;
-    }
     return (Status);
 }
 
@@ -406,11 +404,8 @@ AcpiHwGpeEnableWrite (
     ACPI_STATUS             Status;
 
 
+    GpeRegisterInfo->EnableMask = EnableMask;
     Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress);
-    if (ACPI_SUCCESS (Status))
-    {
-        GpeRegisterInfo->EnableMask = EnableMask;
-    }
 
     return (Status);
 }