aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/utdelete.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/utdelete.c')
-rw-r--r--drivers/acpi/acpica/utdelete.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/utdelete.c b/drivers/acpi/acpica/utdelete.c
index a5ee23bc4f55..bc1710315088 100644
--- a/drivers/acpi/acpica/utdelete.c
+++ b/drivers/acpi/acpica/utdelete.c
@@ -75,6 +75,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)
75 union acpi_operand_object *handler_desc; 75 union acpi_operand_object *handler_desc;
76 union acpi_operand_object *second_desc; 76 union acpi_operand_object *second_desc;
77 union acpi_operand_object *next_desc; 77 union acpi_operand_object *next_desc;
78 union acpi_operand_object **last_obj_ptr;
78 79
79 ACPI_FUNCTION_TRACE_PTR(ut_delete_internal_obj, object); 80 ACPI_FUNCTION_TRACE_PTR(ut_delete_internal_obj, object);
80 81
@@ -223,6 +224,26 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)
223 */ 224 */
224 handler_desc = object->region.handler; 225 handler_desc = object->region.handler;
225 if (handler_desc) { 226 if (handler_desc) {
227 next_desc =
228 handler_desc->address_space.region_list;
229 last_obj_ptr =
230 &handler_desc->address_space.region_list;
231
232 /* Remove the region object from the handler's list */
233
234 while (next_desc) {
235 if (next_desc == object) {
236 *last_obj_ptr =
237 next_desc->region.next;
238 break;
239 }
240
241 /* Walk the linked list of handler */
242
243 last_obj_ptr = &next_desc->region.next;
244 next_desc = next_desc->region.next;
245 }
246
226 if (handler_desc->address_space.handler_flags & 247 if (handler_desc->address_space.handler_flags &
227 ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) { 248 ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) {
228 249