summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorAlex Chiang <achiang@hp.com>2009-05-21 04:59:15 +0200
committerLen Brown <len.brown@intel.com>2009-05-27 06:35:51 +0200
commitc446eed6187addf9f76ee0028abed32393aef27e (patch)
treee2474b872fe332a97ba3e6e7bc6ace3c9e67bed4 /drivers/acpi
parentACPICA: Simplify internal operation region interface (diff)
downloadlinux-c446eed6187addf9f76ee0028abed32393aef27e.tar.xz
linux-c446eed6187addf9f76ee0028abed32393aef27e.zip
ACPICA: Eliminate extra call to NsGetParentNode
Was called twice in the same function with the same parameter. Alex Chiang. Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/acpica/nsxfobj.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/acpi/acpica/nsxfobj.c b/drivers/acpi/acpica/nsxfobj.c
index dd33d8b53d6d..4071bad4458e 100644
--- a/drivers/acpi/acpica/nsxfobj.c
+++ b/drivers/acpi/acpica/nsxfobj.c
@@ -162,6 +162,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_type)
acpi_status acpi_get_parent(acpi_handle handle, acpi_handle * ret_handle)
{
struct acpi_namespace_node *node;
+ struct acpi_namespace_node *parent_node;
acpi_status status;
if (!ret_handle) {
@@ -189,12 +190,12 @@ acpi_status acpi_get_parent(acpi_handle handle, acpi_handle * ret_handle)
/* Get the parent entry */
- *ret_handle =
- acpi_ns_convert_entry_to_handle(acpi_ns_get_parent_node(node));
+ parent_node = acpi_ns_get_parent_node(node);
+ *ret_handle = acpi_ns_convert_entry_to_handle(parent_node);
/* Return exception if parent is null */
- if (!acpi_ns_get_parent_node(node)) {
+ if (!parent_node) {
status = AE_NULL_ENTRY;
}