diff options
Diffstat (limited to 'drivers/acpi/acpica/dsmethod.c')
-rw-r--r-- | drivers/acpi/acpica/dsmethod.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c index 2a9a561c2f0..64750ee96e2 100644 --- a/drivers/acpi/acpica/dsmethod.c +++ b/drivers/acpi/acpica/dsmethod.c @@ -584,8 +584,22 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc, * want make the objects permanent. */ if (!(method_desc->method.flags & AOPOBJ_MODULE_LEVEL)) { - acpi_ns_delete_namespace_by_owner(method_desc->method. - owner_id); + + /* Delete any direct children of (created by) this method */ + + acpi_ns_delete_namespace_subtree(walk_state-> + method_node); + + /* + * Delete any objects that were created by this method + * elsewhere in the namespace (if any were created). + */ + if (method_desc->method. + flags & AOPOBJ_MODIFIED_NAMESPACE) { + acpi_ns_delete_namespace_by_owner(method_desc-> + method. + owner_id); + } } } @@ -605,7 +619,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc, * we immediately reuse it for the next thread executing this method */ ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, - "*** Completed execution of one thread, %d threads remaining\n", + "*** Completed execution of one thread, %u threads remaining\n", method_desc->method.thread_count)); } else { /* This is the only executing thread for this method */ |