aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/namespace
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2006-12-20 02:53:27 -0500
committerLen Brown <len.brown@intel.com>2006-12-20 02:53:27 -0500
commit5b7b4119553dd7cc0bc200c0d1b1598e158eec9a (patch)
tree129958102c839867905976d08b7e7298c682adbf /drivers/acpi/namespace
parent9774f3384125912eb491ca77f77907324db3ed05 (diff)
parent0f0fe1a08aa421266060ac67e50453a06d9ceb63 (diff)
Pull sgi into test branch
Diffstat (limited to 'drivers/acpi/namespace')
-rw-r--r--drivers/acpi/namespace/nsxfobj.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/drivers/acpi/namespace/nsxfobj.c b/drivers/acpi/namespace/nsxfobj.c
index a163e1d3708..a18b1c22312 100644
--- a/drivers/acpi/namespace/nsxfobj.c
+++ b/drivers/acpi/namespace/nsxfobj.c
@@ -50,6 +50,50 @@ ACPI_MODULE_NAME("nsxfobj")
/*******************************************************************************
*
+ * FUNCTION: acpi_get_id
+ *
+ * PARAMETERS: Handle - Handle of object whose id is desired
+ * ret_id - Where the id will be placed
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: This routine returns the owner id associated with a handle
+ *
+ ******************************************************************************/
+acpi_status acpi_get_id(acpi_handle handle, acpi_owner_id * ret_id)
+{
+ struct acpi_namespace_node *node;
+ acpi_status status;
+
+ /* Parameter Validation */
+
+ if (!ret_id) {
+ return (AE_BAD_PARAMETER);
+ }
+
+ status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
+ if (ACPI_FAILURE(status)) {
+ return (status);
+ }
+
+ /* Convert and validate the handle */
+
+ node = acpi_ns_map_handle_to_node(handle);
+ if (!node) {
+ (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
+ return (AE_BAD_PARAMETER);
+ }
+
+ *ret_id = node->owner_id;
+
+ status = acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
+ return (status);
+}
+
+ACPI_EXPORT_SYMBOL(acpi_get_id)
+
+/*******************************************************************************
+ *
* FUNCTION: acpi_get_type
*
* PARAMETERS: Handle - Handle of object whose type is desired