diff options
Diffstat (limited to 'drivers/acpi/acpica/nsutils.c')
-rw-r--r-- | drivers/acpi/acpica/nsutils.c | 113 |
1 files changed, 0 insertions, 113 deletions
diff --git a/drivers/acpi/acpica/nsutils.c b/drivers/acpi/acpica/nsutils.c index bab559712da1..e1add3491b04 100644 --- a/drivers/acpi/acpica/nsutils.c +++ b/drivers/acpi/acpica/nsutils.c | |||
@@ -847,116 +847,3 @@ acpi_ns_get_node(struct acpi_namespace_node *prefix_node, | |||
847 | ACPI_FREE(internal_path); | 847 | ACPI_FREE(internal_path); |
848 | return_ACPI_STATUS(status); | 848 | return_ACPI_STATUS(status); |
849 | } | 849 | } |
850 | |||
851 | /******************************************************************************* | ||
852 | * | ||
853 | * FUNCTION: acpi_ns_get_parent_node | ||
854 | * | ||
855 | * PARAMETERS: Node - Current table entry | ||
856 | * | ||
857 | * RETURN: Parent entry of the given entry | ||
858 | * | ||
859 | * DESCRIPTION: Obtain the parent entry for a given entry in the namespace. | ||
860 | * | ||
861 | ******************************************************************************/ | ||
862 | |||
863 | struct acpi_namespace_node *acpi_ns_get_parent_node(struct acpi_namespace_node | ||
864 | *node) | ||
865 | { | ||
866 | ACPI_FUNCTION_ENTRY(); | ||
867 | |||
868 | if (!node) { | ||
869 | return (NULL); | ||
870 | } | ||
871 | |||
872 | /* | ||
873 | * Walk to the end of this peer list. The last entry is marked with a flag | ||
874 | * and the peer pointer is really a pointer back to the parent. This saves | ||
875 | * putting a parent back pointer in each and every named object! | ||
876 | */ | ||
877 | while (!(node->flags & ANOBJ_END_OF_PEER_LIST)) { | ||
878 | node = node->peer; | ||
879 | } | ||
880 | |||
881 | return (node->peer); | ||
882 | } | ||
883 | |||
884 | /******************************************************************************* | ||
885 | * | ||
886 | * FUNCTION: acpi_ns_get_next_valid_node | ||
887 | * | ||
888 | * PARAMETERS: Node - Current table entry | ||
889 | * | ||
890 | * RETURN: Next valid Node in the linked node list. NULL if no more valid | ||
891 | * nodes. | ||
892 | * | ||
893 | * DESCRIPTION: Find the next valid node within a name table. | ||
894 | * Useful for implementing NULL-end-of-list loops. | ||
895 | * | ||
896 | ******************************************************************************/ | ||
897 | |||
898 | struct acpi_namespace_node *acpi_ns_get_next_valid_node(struct | ||
899 | acpi_namespace_node | ||
900 | *node) | ||
901 | { | ||
902 | |||
903 | /* If we are at the end of this peer list, return NULL */ | ||
904 | |||
905 | if (node->flags & ANOBJ_END_OF_PEER_LIST) { | ||
906 | return NULL; | ||
907 | } | ||
908 | |||
909 | /* Otherwise just return the next peer */ | ||
910 | |||
911 | return (node->peer); | ||
912 | } | ||
913 | |||
914 | #ifdef ACPI_OBSOLETE_FUNCTIONS | ||
915 | /******************************************************************************* | ||
916 | * | ||
917 | * FUNCTION: acpi_ns_find_parent_name | ||
918 | * | ||
919 | * PARAMETERS: *child_node - Named Obj whose name is to be found | ||
920 | * | ||
921 | * RETURN: The ACPI name | ||
922 | * | ||
923 | * DESCRIPTION: Search for the given obj in its parent scope and return the | ||
924 | * name segment, or "????" if the parent name can't be found | ||
925 | * (which "should not happen"). | ||
926 | * | ||
927 | ******************************************************************************/ | ||
928 | |||
929 | acpi_name acpi_ns_find_parent_name(struct acpi_namespace_node * child_node) | ||
930 | { | ||
931 | struct acpi_namespace_node *parent_node; | ||
932 | |||
933 | ACPI_FUNCTION_TRACE(ns_find_parent_name); | ||
934 | |||
935 | if (child_node) { | ||
936 | |||
937 | /* Valid entry. Get the parent Node */ | ||
938 | |||
939 | parent_node = acpi_ns_get_parent_node(child_node); | ||
940 | if (parent_node) { | ||
941 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, | ||
942 | "Parent of %p [%4.4s] is %p [%4.4s]\n", | ||
943 | child_node, | ||
944 | acpi_ut_get_node_name(child_node), | ||
945 | parent_node, | ||
946 | acpi_ut_get_node_name(parent_node))); | ||
947 | |||
948 | if (parent_node->name.integer) { | ||
949 | return_VALUE((acpi_name) parent_node->name. | ||
950 | integer); | ||
951 | } | ||
952 | } | ||
953 | |||
954 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, | ||
955 | "Unable to find parent of %p (%4.4s)\n", | ||
956 | child_node, | ||
957 | acpi_ut_get_node_name(child_node))); | ||
958 | } | ||
959 | |||
960 | return_VALUE(ACPI_UNKNOWN_NAME); | ||
961 | } | ||
962 | #endif | ||