diff options
Diffstat (limited to 'drivers/acpi/acpica/dsmethod.c')
-rw-r--r-- | drivers/acpi/acpica/dsmethod.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/acpi/acpica/dsmethod.c b/drivers/acpi/acpica/dsmethod.c index 14b8b8ed8023..567a4899a018 100644 --- a/drivers/acpi/acpica/dsmethod.c +++ b/drivers/acpi/acpica/dsmethod.c | |||
@@ -578,10 +578,15 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc, | |||
578 | } | 578 | } |
579 | 579 | ||
580 | /* | 580 | /* |
581 | * Delete any namespace objects created anywhere within | 581 | * Delete any namespace objects created anywhere within the |
582 | * the namespace by the execution of this method | 582 | * namespace by the execution of this method. Unless this method |
583 | * is a module-level executable code method, in which case we | ||
584 | * want make the objects permanent. | ||
583 | */ | 585 | */ |
584 | acpi_ns_delete_namespace_by_owner(method_desc->method.owner_id); | 586 | if (!(method_desc->method.flags & AOPOBJ_MODULE_LEVEL)) { |
587 | acpi_ns_delete_namespace_by_owner(method_desc->method. | ||
588 | owner_id); | ||
589 | } | ||
585 | } | 590 | } |
586 | 591 | ||
587 | /* Decrement the thread count on the method */ | 592 | /* Decrement the thread count on the method */ |
@@ -622,7 +627,9 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc, | |||
622 | 627 | ||
623 | /* No more threads, we can free the owner_id */ | 628 | /* No more threads, we can free the owner_id */ |
624 | 629 | ||
625 | acpi_ut_release_owner_id(&method_desc->method.owner_id); | 630 | if (!(method_desc->method.flags & AOPOBJ_MODULE_LEVEL)) { |
631 | acpi_ut_release_owner_id(&method_desc->method.owner_id); | ||
632 | } | ||
626 | } | 633 | } |
627 | 634 | ||
628 | return_VOID; | 635 | return_VOID; |