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>
This commit is contained in:

zatwierdzone przez
Len Brown

rodzic
f238085415
commit
0f0fe1a08a
@@ -48,6 +48,50 @@
|
||||
#define _COMPONENT ACPI_NAMESPACE
|
||||
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
|
||||
|
Reference in New Issue
Block a user