ACPICA: Update internal namespace node/handle interfaces

This change deletes the unnecessary acpi_ns_convert_entry_to_handle
interface and renames the acpi_ns_map_handle_to_node interface to
acpi_ns_validate_handle.  ACPICA BZ 798.

http://www.acpica.org/bugzilla/show_bug.cgi?id=798

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
Bob Moore
2009-12-11 14:57:00 +08:00
committed by Len Brown
parent 34c39c7553
commit f24b664dc4
12 changed files with 40 additions and 77 deletions

View File

@@ -671,24 +671,25 @@ acpi_ns_externalize_name(u32 internal_name_length,
/*******************************************************************************
*
* FUNCTION: acpi_ns_map_handle_to_node
* FUNCTION: acpi_ns_validate_handle
*
* PARAMETERS: Handle - Handle to be converted to an Node
* PARAMETERS: Handle - Handle to be validated and typecast to a
* namespace node.
*
* RETURN: A Name table entry pointer
* RETURN: A pointer to a namespace node
*
* DESCRIPTION: Convert a namespace handle to a real Node
* DESCRIPTION: Convert a namespace handle to a namespace node. Handles special
* cases for the root node.
*
* Note: Real integer handles would allow for more verification
* NOTE: Real integer handles would allow for more verification
* and keep all pointers within this subsystem - however this introduces
* more (and perhaps unnecessary) overhead.
*
* The current implemenation is basically a placeholder until such time comes
* that it is needed.
* more overhead and has not been necessary to this point. Drivers
* holding handles are typically notified before a node becomes invalid
* due to a table unload.
*
******************************************************************************/
struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle)
struct acpi_namespace_node *acpi_ns_validate_handle(acpi_handle handle)
{
ACPI_FUNCTION_ENTRY();
@@ -708,42 +709,6 @@ struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle)
return (ACPI_CAST_PTR(struct acpi_namespace_node, handle));
}
/*******************************************************************************
*
* FUNCTION: acpi_ns_convert_entry_to_handle
*
* PARAMETERS: Node - Node to be converted to a Handle
*
* RETURN: A user handle
*
* DESCRIPTION: Convert a real Node to a namespace handle
*
******************************************************************************/
acpi_handle acpi_ns_convert_entry_to_handle(struct acpi_namespace_node *node)
{
/*
* Simple implementation for now;
*/
return ((acpi_handle) node);
/* Example future implementation ---------------------
if (!Node)
{
return (NULL);
}
if (Node == acpi_gbl_root_node)
{
return (ACPI_ROOT_OBJECT);
}
return ((acpi_handle) Node);
------------------------------------------------------*/
}
/*******************************************************************************
*
* FUNCTION: acpi_ns_terminate