aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/namespace
diff options
context:
space:
mode:
authorJohn Keller <jpk@sgi.com>2006-12-19 15:56:19 -0500
committerLen Brown <len.brown@intel.com>2006-12-20 01:51:14 -0500
commit0f0fe1a08aa421266060ac67e50453a06d9ceb63 (patch)
treeadba2e86e815a35fc05b6fd5e5a55362974a444a /drivers/acpi/namespace
parentf238085415c56618e042252894f2fcc971add645 (diff)
ACPI: Add support for acpi_load_table/acpi_unload_table_id
Make acpi_load_table() available for use by removing it from the #ifdef ACPI_FUTURE_USAGE. Also add a new routine used to unload an ACPI table of a given type and "id" - acpi_unload_table_id(). The implementation of this new routine was almost a direct copy of existing routine acpi_unload_table() - only difference being that it only removes a specific table id instead of ALL tables of a given type. The SN hotplug driver (sgi_hotplug.c) now uses both of these interfaces to dynamically load and unload SSDT ACPI tables. Also, a few other ACPI routines now used by the SN hotplug driver are exported (since the driver can be a loadable module): acpi_ns_map_handle_to_node acpi_ns_convert_entry_to_handle acpi_ns_get_next_node Signed-off-by: Aaron Young <ayoung@sgi.com> Cc: Greg KH <greg@kroah.com> Cc: "Luck, Tony" <tony.luck@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Len Brown <len.brown@intel.com>
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 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 ******************************************************************************/
63acpi_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
93ACPI_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