From patchwork Tue May 18 20:25:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Starikovskiy X-Patchwork-Id: 100600 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4IKPSmk024836 for ; Tue, 18 May 2010 20:25:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755355Ab0ERUZe (ORCPT ); Tue, 18 May 2010 16:25:34 -0400 Received: from nat.nue.novell.com ([195.135.221.3]:33718 "EHLO nat.nue.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755260Ab0ERUZd (ORCPT ); Tue, 18 May 2010 16:25:33 -0400 Received: from [127.0.1.1] ([149.44.162.75]) by nat.nue.novell.com with ESMTP; Tue, 18 May 2010 22:25:32 +0200 Subject: [PATCH 2/3] ACPICA: Keep track of method changes to namespace To: Robert Moore , Len Brown From: Alexey Starikovskiy Cc: Linux-acpi@vger.kernel.org Date: Wed, 19 May 2010 00:25:31 +0400 Message-ID: <20100518202531.29771.18173.stgit@thinkpad> In-Reply-To: <20100518202524.29771.96252.stgit@thinkpad> References: <20100518202524.29771.96252.stgit@thinkpad> User-Agent: StGit/0.15 MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 18 May 2010 20:25:44 +0000 (UTC) diff --git a/source/components/dispatcher/dsmethod.c b/source/components/dispatcher/dsmethod.c index 969c9ca..fe7a9a8 100644 --- a/source/components/dispatcher/dsmethod.c +++ b/source/components/dispatcher/dsmethod.c @@ -700,7 +700,10 @@ AcpiDsTerminateControlMethod ( */ if (!(MethodDesc->Method.Flags & AOPOBJ_MODULE_LEVEL)) { - AcpiNsDeleteNamespaceByOwner (MethodDesc->Method.OwnerId); + if (MethodDesc->Method.UsesNamespace) + { + AcpiNsDeleteNamespaceByOwner (MethodDesc->Method.OwnerId); + } } } diff --git a/source/components/namespace/nsalloc.c b/source/components/namespace/nsalloc.c index aadafbf..16bcdd3 100644 --- a/source/components/namespace/nsalloc.c +++ b/source/components/namespace/nsalloc.c @@ -343,6 +343,10 @@ AcpiNsInstallNode ( if (WalkState) { OwnerId = WalkState->OwnerId; + if (WalkState->MethodDesc) + { + WalkState->MethodDesc->Method.UsesNamespace = 1; + } } /* Link the new entry into the parent and existing children */ diff --git a/source/include/acobject.h b/source/include/acobject.h index f86f839..502132a 100644 --- a/source/include/acobject.h +++ b/source/include/acobject.h @@ -296,6 +296,7 @@ typedef struct acpi_object_method UINT32 AmlLength; UINT8 ThreadCount; + UINT8 UsesNamespace; ACPI_OWNER_ID OwnerId; } ACPI_OBJECT_METHOD;