diff options
Diffstat (limited to 'sys/contrib/dev/acpica/evxface.c')
-rw-r--r-- | sys/contrib/dev/acpica/evxface.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/sys/contrib/dev/acpica/evxface.c b/sys/contrib/dev/acpica/evxface.c index 7a6a84f..4444070 100644 --- a/sys/contrib/dev/acpica/evxface.c +++ b/sys/contrib/dev/acpica/evxface.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: evxface - External interfaces for ACPI events - * $Revision: 126 $ + * $Revision: 129 $ * *****************************************************************************/ @@ -118,10 +118,8 @@ #define __EVXFACE_C__ #include "acpi.h" -#include "achware.h" #include "acnamesp.h" #include "acevents.h" -#include "amlcode.h" #include "acinterp.h" #define _COMPONENT ACPI_EVENTS @@ -178,7 +176,6 @@ AcpiInstallFixedEventHandler ( goto Cleanup; } - /* Install the handler before enabling the event */ AcpiGbl_FixedEventHandlers[Event].Handler = Handler; @@ -655,8 +652,13 @@ AcpiInstallGpeHandler ( /* Clear the GPE (of stale events), the enable it */ - AcpiHwClearGpe (GpeNumber); - AcpiHwEnableGpe (GpeNumber); + Status = AcpiHwClearGpe (GpeNumber); + if (ACPI_FAILURE (Status)) + { + goto Cleanup; + } + + Status = AcpiHwEnableGpe (GpeNumber); Cleanup: @@ -707,7 +709,11 @@ AcpiRemoveGpeHandler ( /* Disable the GPE before removing the handler */ - AcpiHwDisableGpe (GpeNumber); + Status = AcpiHwDisableGpe (GpeNumber); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS); if (ACPI_FAILURE (Status)) @@ -719,7 +725,7 @@ AcpiRemoveGpeHandler ( if (AcpiGbl_GpeNumberInfo[GpeNumberIndex].Handler != Handler) { - AcpiHwEnableGpe (GpeNumber); + (void) AcpiHwEnableGpe (GpeNumber); Status = AE_BAD_PARAMETER; goto Cleanup; } @@ -797,14 +803,16 @@ ACPI_STATUS AcpiReleaseGlobalLock ( UINT32 Handle) { + ACPI_STATUS Status; + if (Handle != AcpiGbl_GlobalLockHandle) { return (AE_NOT_ACQUIRED); } - AcpiEvReleaseGlobalLock (); - return (AE_OK); + Status = AcpiEvReleaseGlobalLock (); + return (Status); } |