From b860aecaa9a8db944fa54e59c1b5e520615d461d Mon Sep 17 00:00:00 2001 From: aystarik Date: Wed, 29 Jun 2005 20:40:47 +0000 Subject: [PATCH] Handler fixes for reference count issues and allow multiple installs of the same handler with no error date 2003.05.07.18.04.00; author rmoore1; state Exp; --- source/tools/acpiexec/aeexec.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/source/tools/acpiexec/aeexec.c b/source/tools/acpiexec/aeexec.c index cfd29d560..83f759bf9 100644 --- a/source/tools/acpiexec/aeexec.c +++ b/source/tools/acpiexec/aeexec.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: aeexec - Support routines for AcpiExec utility - * $Revision: 1.68 $ + * $Revision: 1.69 $ * *****************************************************************************/ @@ -749,6 +749,7 @@ AeInstallHandlers (void) { ACPI_STATUS Status; UINT32 i; + ACPI_HANDLE Handle; ACPI_FUNCTION_NAME ("AeInstallHandlers"); @@ -762,8 +763,24 @@ AeInstallHandlers (void) AcpiFormatException (Status)); } + Status = AcpiGetHandle (NULL, "\\_SB_", &Handle); + if (ACPI_SUCCESS (Status)) + { + Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY, + AeNotifyHandler, NULL); + Status = AcpiRemoveNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY, + AeNotifyHandler); + Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY, + AeNotifyHandler, NULL); + } + for (i = 0; i < AEXEC_NUM_REGIONS; i++) { + if (i == 2) + { + continue; + } + Status = AcpiRemoveAddressSpaceHandler (AcpiGbl_RootNode, SpaceId[i], AeRegionHandler);