All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Starikovskiy <astarikovskiy@suse.de>
To: Robert Moore <robert.moore@intel.com>, Len Brown <lenb@kernel.org>
Cc: Linux-acpi@vger.kernel.org
Subject: [PATCH 2/3] ACPICA: Keep track of method changes to namespace
Date: Wed, 19 May 2010 00:25:31 +0400	[thread overview]
Message-ID: <20100518202531.29771.18173.stgit@thinkpad> (raw)
In-Reply-To: <20100518202524.29771.96252.stgit@thinkpad>

Try to delete nodes from namespace only if method really added them

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
---

 source/components/dispatcher/dsmethod.c |    5 ++++-
 source/components/namespace/nsalloc.c   |    4 ++++
 source/include/acobject.h               |    1 +
 3 files changed, 9 insertions(+), 1 deletions(-)


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;


  reply	other threads:[~2010-05-18 20:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-18 20:25 [PATCH 1/3] ACPICA: make ObjectCount to be UINT32 Alexey Starikovskiy
2010-05-18 20:25 ` Alexey Starikovskiy [this message]
2010-05-18 20:25 ` [PATCH 3/3] ACPICA: Add direct pointer to parent Alexey Starikovskiy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100518202531.29771.18173.stgit@thinkpad \
    --to=astarikovskiy@suse.de \
    --cc=Linux-acpi@vger.kernel.org \
    --cc=lenb@kernel.org \
    --cc=robert.moore@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.