aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utilities/utdelete.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/utilities/utdelete.c')
-rw-r--r--drivers/acpi/utilities/utdelete.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c
index c5c791a575c9..d197c6b29e17 100644
--- a/drivers/acpi/utilities/utdelete.c
+++ b/drivers/acpi/utilities/utdelete.c
@@ -45,7 +45,6 @@
45#include <acpi/acinterp.h> 45#include <acpi/acinterp.h>
46#include <acpi/acnamesp.h> 46#include <acpi/acnamesp.h>
47#include <acpi/acevents.h> 47#include <acpi/acevents.h>
48#include <acpi/amlcode.h>
49 48
50#define _COMPONENT ACPI_UTILITIES 49#define _COMPONENT ACPI_UTILITIES
51ACPI_MODULE_NAME("utdelete") 50ACPI_MODULE_NAME("utdelete")
@@ -135,6 +134,10 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)
135 obj_pointer = object->package.elements; 134 obj_pointer = object->package.elements;
136 break; 135 break;
137 136
137 /*
138 * These objects have a possible list of notify handlers.
139 * Device object also may have a GPE block.
140 */
138 case ACPI_TYPE_DEVICE: 141 case ACPI_TYPE_DEVICE:
139 142
140 if (object->device.gpe_block) { 143 if (object->device.gpe_block) {
@@ -142,9 +145,14 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)
142 gpe_block); 145 gpe_block);
143 } 146 }
144 147
145 /* Walk the handler list for this device */ 148 /*lint -fallthrough */
149
150 case ACPI_TYPE_PROCESSOR:
151 case ACPI_TYPE_THERMAL:
152
153 /* Walk the notify handler list for this object */
146 154
147 handler_desc = object->device.handler; 155 handler_desc = object->common_notify.handler;
148 while (handler_desc) { 156 while (handler_desc) {
149 next_desc = handler_desc->address_space.next; 157 next_desc = handler_desc->address_space.next;
150 acpi_ut_remove_reference(handler_desc); 158 acpi_ut_remove_reference(handler_desc);
@@ -539,8 +547,8 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
539 * reference must track changes to the ref count of the index or 547 * reference must track changes to the ref count of the index or
540 * target object. 548 * target object.
541 */ 549 */
542 if ((object->reference.opcode == AML_INDEX_OP) || 550 if ((object->reference.class == ACPI_REFCLASS_INDEX) ||
543 (object->reference.opcode == AML_INT_NAMEPATH_OP)) { 551 (object->reference.class == ACPI_REFCLASS_NAME)) {
544 next_object = object->reference.object; 552 next_object = object->reference.object;
545 } 553 }
546 break; 554 break;
@@ -577,6 +585,13 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)
577 ACPI_EXCEPTION((AE_INFO, status, 585 ACPI_EXCEPTION((AE_INFO, status,
578 "Could not update object reference count")); 586 "Could not update object reference count"));
579 587
588 /* Free any stacked Update State objects */
589
590 while (state_list) {
591 state = acpi_ut_pop_generic_state(&state_list);
592 acpi_ut_delete_generic_state(state);
593 }
594
580 return_ACPI_STATUS(status); 595 return_ACPI_STATUS(status);
581} 596}
582 597