From: Alex Chiang Date: Thu, 21 May 2009 02:59:15 +0000 (+0800) Subject: ACPICA: Eliminate extra call to NsGetParentNode X-Git-Tag: upstream/snapshot3+hdmi~18597^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c446eed6187addf9f76ee0028abed32393aef27e;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ACPICA: Eliminate extra call to NsGetParentNode Was called twice in the same function with the same parameter. Alex Chiang. Signed-off-by: Alex Chiang Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- diff --git a/drivers/acpi/acpica/nsxfobj.c b/drivers/acpi/acpica/nsxfobj.c index dd33d8b..4071bad 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; }