diff options
Diffstat (limited to 'sys/contrib/dev/acpica/utdelete.c')
-rw-r--r-- | sys/contrib/dev/acpica/utdelete.c | 46 |
1 files changed, 5 insertions, 41 deletions
diff --git a/sys/contrib/dev/acpica/utdelete.c b/sys/contrib/dev/acpica/utdelete.c index 36da0ff..50a5bb4 100644 --- a/sys/contrib/dev/acpica/utdelete.c +++ b/sys/contrib/dev/acpica/utdelete.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: utdelete - object deletion and reference count utilities - * $Revision: 97 $ + * $Revision: 98 $ * ******************************************************************************/ @@ -219,7 +219,7 @@ AcpiUtDeleteInternalObj ( /* Walk the handler list for this device */ - HandlerDesc = Object->Device.AddressSpace; + HandlerDesc = Object->Device.Handler; while (HandlerDesc) { NextDesc = HandlerDesc->AddressSpace.Next; @@ -275,7 +275,7 @@ AcpiUtDeleteInternalObj ( * default handlers -- and therefore, we created the context object * locally, it was not created by an external caller. */ - HandlerDesc = Object->Region.AddressSpace; + HandlerDesc = Object->Region.Handler; if (HandlerDesc) { if (HandlerDesc->AddressSpace.Hflags & ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) @@ -510,7 +510,6 @@ AcpiUtUpdateObjectReference ( UINT32 i; ACPI_GENERIC_STATE *StateList = NULL; ACPI_GENERIC_STATE *State; - ACPI_OPERAND_OBJECT *tmp; ACPI_FUNCTION_TRACE_PTR ("UtUpdateObjectReference", Object); @@ -547,15 +546,8 @@ AcpiUtUpdateObjectReference ( { case ACPI_TYPE_DEVICE: - tmp = Object->Device.SystemNotify; - if (tmp && (tmp->Common.ReferenceCount <= 1) && Action == REF_DECREMENT) - Object->Device.SystemNotify = NULL; - AcpiUtUpdateRefCount (tmp, Action); - - tmp = Object->Device.DeviceNotify; - if (tmp && (tmp->Common.ReferenceCount <= 1) && Action == REF_DECREMENT) - Object->Device.DeviceNotify = NULL; - AcpiUtUpdateRefCount (tmp, Action); + AcpiUtUpdateRefCount (Object->Device.SystemNotify, Action); + AcpiUtUpdateRefCount (Object->Device.DeviceNotify, Action); break; @@ -578,10 +570,6 @@ AcpiUtUpdateObjectReference ( { goto ErrorExit; } - - tmp = Object->Package.Elements[i]; - if (tmp && (tmp->Common.ReferenceCount <= 1) && Action == REF_DECREMENT) - Object->Package.Elements[i] = NULL; } break; @@ -594,10 +582,6 @@ AcpiUtUpdateObjectReference ( { goto ErrorExit; } - - tmp = Object->BufferField.BufferObj; - if (tmp && (tmp->Common.ReferenceCount <= 1) && Action == REF_DECREMENT) - Object->BufferField.BufferObj = NULL; break; @@ -609,10 +593,6 @@ AcpiUtUpdateObjectReference ( { goto ErrorExit; } - - tmp = Object->Field.RegionObj; - if (tmp && (tmp->Common.ReferenceCount <= 1) && Action == REF_DECREMENT) - Object->Field.RegionObj = NULL; break; @@ -625,20 +605,12 @@ AcpiUtUpdateObjectReference ( goto ErrorExit; } - tmp = Object->BankField.BankObj; - if (tmp && (tmp->Common.ReferenceCount <= 1) && Action == REF_DECREMENT) - Object->BankField.BankObj = NULL; - Status = AcpiUtCreateUpdateStateAndPush ( Object->BankField.RegionObj, Action, &StateList); if (ACPI_FAILURE (Status)) { goto ErrorExit; } - - tmp = Object->BankField.RegionObj; - if (tmp && (tmp->Common.ReferenceCount <= 1) && Action == REF_DECREMENT) - Object->BankField.RegionObj = NULL; break; @@ -651,20 +623,12 @@ AcpiUtUpdateObjectReference ( goto ErrorExit; } - tmp = Object->IndexField.IndexObj; - if (tmp && (tmp->Common.ReferenceCount <= 1) && Action == REF_DECREMENT) - Object->IndexField.IndexObj = NULL; - Status = AcpiUtCreateUpdateStateAndPush ( Object->IndexField.DataObj, Action, &StateList); if (ACPI_FAILURE (Status)) { goto ErrorExit; } - - tmp = Object->IndexField.DataObj; - if (tmp && (tmp->Common.ReferenceCount <= 1) && Action == REF_DECREMENT) - Object->IndexField.DataObj = NULL; break; |