diff options
Diffstat (limited to 'drivers/acpi/namespace/nsxfobj.c')
-rw-r--r-- | drivers/acpi/namespace/nsxfobj.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/drivers/acpi/namespace/nsxfobj.c b/drivers/acpi/namespace/nsxfobj.c index a163e1d3708d..a18b1c223129 100644 --- a/drivers/acpi/namespace/nsxfobj.c +++ b/drivers/acpi/namespace/nsxfobj.c | |||
@@ -50,6 +50,50 @@ ACPI_MODULE_NAME("nsxfobj") | |||
50 | 50 | ||
51 | /******************************************************************************* | 51 | /******************************************************************************* |
52 | * | 52 | * |
53 | * FUNCTION: acpi_get_id | ||
54 | * | ||
55 | * PARAMETERS: Handle - Handle of object whose id is desired | ||
56 | * ret_id - Where the id will be placed | ||
57 | * | ||
58 | * RETURN: Status | ||
59 | * | ||
60 | * DESCRIPTION: This routine returns the owner id associated with a handle | ||
61 | * | ||
62 | ******************************************************************************/ | ||
63 | acpi_status acpi_get_id(acpi_handle handle, acpi_owner_id * ret_id) | ||
64 | { | ||
65 | struct acpi_namespace_node *node; | ||
66 | acpi_status status; | ||
67 | |||
68 | /* Parameter Validation */ | ||
69 | |||
70 | if (!ret_id) { | ||
71 | return (AE_BAD_PARAMETER); | ||
72 | } | ||
73 | |||
74 | status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); | ||
75 | if (ACPI_FAILURE(status)) { | ||
76 | return (status); | ||
77 | } | ||
78 | |||
79 | /* Convert and validate the handle */ | ||
80 | |||
81 | node = acpi_ns_map_handle_to_node(handle); | ||
82 | if (!node) { | ||
83 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | ||
84 | return (AE_BAD_PARAMETER); | ||
85 | } | ||
86 | |||
87 | *ret_id = node->owner_id; | ||
88 | |||
89 | status = acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | ||
90 | return (status); | ||
91 | } | ||
92 | |||
93 | ACPI_EXPORT_SYMBOL(acpi_get_id) | ||
94 | |||
95 | /******************************************************************************* | ||
96 | * | ||
53 | * FUNCTION: acpi_get_type | 97 | * FUNCTION: acpi_get_type |
54 | * | 98 | * |
55 | * PARAMETERS: Handle - Handle of object whose type is desired | 99 | * PARAMETERS: Handle - Handle of object whose type is desired |