FreeBSD/sys/contrib/dev/acpica/components/namespace/nswalk.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiNsGetNextNodeTyped
 *
 * PARAMETERS:  Type                - Type of node to be searched for
 *              ParentNode          - Parent node whose children we are
 *                                    getting
 *              ChildNode           - Previous child that was found.
 *                                    The NEXT child will be returned
 *
 * RETURN:      ACPI_NAMESPACE_NODE - Pointer to the NEXT child or NULL if
 *                                    none is found.
 *
 * DESCRIPTION: Return the next peer node within the namespace. If Handle
 *              is valid, Scope is ignored. Otherwise, the first node
 *              within Scope is returned.
 *
 ******************************************************************************/
AcpiNsGetNextNodeTyped
PARAMETERS:  Type                - Type of node to be searched for
ParentNode          - Parent node whose children we are
getting
ChildNode           - Previous child that was found.
The NEXT child will be returned

Pointer to the NEXT child or NULL if
none is found.

Return the next peer node within the namespace. If Handle
is valid, Scope is ignored. Otherwise, the first node
within Scope is returned.
AcpiNsGetNextNodeTyped PARAMETERS : Type - Type of node to be searched for ParentNode - Parent node whose children we are getting ChildNode - Previous child that was found . The NEXT child will be returned Pointer to the NEXT child or NULL if none is found . Return the next peer node within the namespace . If Handle is valid Scope is ignored . Otherwise the first node within Scope is returned .
ACPI_NAMESPACE_NODE *
AcpiNsGetNextNodeTyped (
    ACPI_OBJECT_TYPE        Type,
    ACPI_NAMESPACE_NODE     *ParentNode,
    ACPI_NAMESPACE_NODE     *ChildNode)
{
    ACPI_NAMESPACE_NODE     *NextNode = NULL;
    ACPI_FUNCTION_ENTRY ();
    NextNode = AcpiNsGetNextNode (ParentNode, ChildNode);
    if (Type == ACPI_TYPE_ANY)
    {
        return (NextNode);
    }
    while (NextNode)
    {
        if (NextNode->Type == Type)
        {
            return (NextNode);
        }
        NextNode = NextNode->Peer;
    }
    return (NULL);
}
ACPI_NAMESPACE_NODE * AcpiNsGetNextNodeTyped ( ACPI_OBJECT_TYPE Type , ACPI_NAMESPACE_NODE * ParentNode , ACPI_NAMESPACE_NODE * ChildNode ) { ACPI_NAMESPACE_NODE * NextNode = NULL ; ACPI_FUNCTION_ENTRY ( ) ; NextNode = AcpiNsGetNextNode ( ParentNode , ChildNode ) ; if ( Type == ACPI_TYPE_ANY ) { return ( NextNode ) ; } while ( NextNode ) { if ( NextNode -> Type == Type ) { return ( NextNode ) ; } NextNode = NextNode -> Peer ; } return ( NULL ) ; }
FUNCTION:    AcpiNsGetNextNodeTyped
 PARAMETERS:  Type                - Type of node to be searched for
              ParentNode          - Parent node whose children we are
                                    getting
              ChildNode           - Previous child that was found.
FUNCTION : AcpiNsGetNextNodeTyped PARAMETERS : Type - Type of node to be searched for ParentNode - Parent node whose children we are getting ChildNode - Previous child that was found .
/* If any type is OK, we are done */ /* NextNode is NULL if we are at the end-of-list */ /* Must search for the node -- but within this scope only */ /* If type matches, we are done */ /* Otherwise, move on to the next peer node */ /* Not found */