diff options
| author | Len Brown <len.brown@intel.com> | 2009-12-15 22:27:39 -0500 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2009-12-15 22:27:39 -0500 |
| commit | 173cc11a6e10c38ff7d4949b48e8d2eb0aee3e05 (patch) | |
| tree | 44ac9a6fe4e9c51b2c54918aa338df7eda96b0a5 /drivers/acpi/acpica/nsutils.c | |
| parent | 8bea8672edfca7ec5f661cafb218f1205863b343 (diff) | |
| parent | 88e5071525ad6814be3a8a2792ce9e81a0cca22a (diff) | |
Merge branch 'acpica' into release
Diffstat (limited to 'drivers/acpi/acpica/nsutils.c')
| -rw-r--r-- | drivers/acpi/acpica/nsutils.c | 57 |
1 files changed, 11 insertions, 46 deletions
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c index ea55ab4f9849..47d91e668a1b 100644 --- a/drivers/acpi/acpica/nsutils.c +++ b/drivers/acpi/acpica/nsutils.c | |||
| @@ -671,24 +671,25 @@ acpi_ns_externalize_name(u32 internal_name_length, | |||
| 671 | 671 | ||
| 672 | /******************************************************************************* | 672 | /******************************************************************************* |
| 673 | * | 673 | * |
| 674 | * FUNCTION: acpi_ns_map_handle_to_node | 674 | * FUNCTION: acpi_ns_validate_handle |
| 675 | * | 675 | * |
| 676 | * PARAMETERS: Handle - Handle to be converted to an Node | 676 | * PARAMETERS: Handle - Handle to be validated and typecast to a |
| 677 | * namespace node. | ||
| 677 | * | 678 | * |
| 678 | * RETURN: A Name table entry pointer | 679 | * RETURN: A pointer to a namespace node |
| 679 | * | 680 | * |
| 680 | * DESCRIPTION: Convert a namespace handle to a real Node | 681 | * DESCRIPTION: Convert a namespace handle to a namespace node. Handles special |
| 682 | * cases for the root node. | ||
| 681 | * | 683 | * |
| 682 | * Note: Real integer handles would allow for more verification | 684 | * NOTE: Real integer handles would allow for more verification |
| 683 | * and keep all pointers within this subsystem - however this introduces | 685 | * and keep all pointers within this subsystem - however this introduces |
| 684 | * more (and perhaps unnecessary) overhead. | 686 | * more overhead and has not been necessary to this point. Drivers |
| 685 | * | 687 | * holding handles are typically notified before a node becomes invalid |
| 686 | * The current implemenation is basically a placeholder until such time comes | 688 | * due to a table unload. |
| 687 | * that it is needed. | ||
| 688 | * | 689 | * |
| 689 | ******************************************************************************/ | 690 | ******************************************************************************/ |
| 690 | 691 | ||
| 691 | struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle) | 692 | struct acpi_namespace_node *acpi_ns_validate_handle(acpi_handle handle) |
| 692 | { | 693 | { |
| 693 | 694 | ||
| 694 | ACPI_FUNCTION_ENTRY(); | 695 | ACPI_FUNCTION_ENTRY(); |
| @@ -710,42 +711,6 @@ struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle) | |||
| 710 | 711 | ||
| 711 | /******************************************************************************* | 712 | /******************************************************************************* |
| 712 | * | 713 | * |
| 713 | * FUNCTION: acpi_ns_convert_entry_to_handle | ||
| 714 | * | ||
| 715 | * PARAMETERS: Node - Node to be converted to a Handle | ||
| 716 | * | ||
| 717 | * RETURN: A user handle | ||
| 718 | * | ||
| 719 | * DESCRIPTION: Convert a real Node to a namespace handle | ||
| 720 | * | ||
| 721 | ******************************************************************************/ | ||
| 722 | |||
| 723 | acpi_handle acpi_ns_convert_entry_to_handle(struct acpi_namespace_node *node) | ||
| 724 | { | ||
| 725 | |||
| 726 | /* | ||
| 727 | * Simple implementation for now; | ||
| 728 | */ | ||
| 729 | return ((acpi_handle) node); | ||
| 730 | |||
| 731 | /* Example future implementation --------------------- | ||
| 732 | |||
| 733 | if (!Node) | ||
| 734 | { | ||
| 735 | return (NULL); | ||
| 736 | } | ||
| 737 | |||
| 738 | if (Node == acpi_gbl_root_node) | ||
| 739 | { | ||
| 740 | return (ACPI_ROOT_OBJECT); | ||
| 741 | } | ||
| 742 | |||
| 743 | return ((acpi_handle) Node); | ||
| 744 | ------------------------------------------------------*/ | ||
| 745 | } | ||
| 746 | |||
| 747 | /******************************************************************************* | ||
| 748 | * | ||
| 749 | * FUNCTION: acpi_ns_terminate | 714 | * FUNCTION: acpi_ns_terminate |
| 750 | * | 715 | * |
| 751 | * PARAMETERS: none | 716 | * PARAMETERS: none |
