FreeBSD/sys/contrib/dev/acpica/components/namespace/nsobject.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiNsDetachData
 *
 * PARAMETERS:  Node            - Namespace node
 *              Handler         - Handler associated with the data
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Low-level detach data. Delete the data node, but the caller
 *              is responsible for the actual data.
 *
 ******************************************************************************/
AcpiNsDetachData
PARAMETERS:  Node            - Namespace node
Handler         - Handler associated with the data

Status

Low-level detach data. Delete the data node, but the caller
is responsible for the actual data.
AcpiNsDetachData PARAMETERS : Node - Namespace node Handler - Handler associated with the data Status Low - level detach data . Delete the data node but the caller is responsible for the actual data .
ACPI_STATUS
AcpiNsDetachData (
    ACPI_NAMESPACE_NODE     *Node,
    ACPI_OBJECT_HANDLER     Handler)
{
    ACPI_OPERAND_OBJECT     *ObjDesc;
    ACPI_OPERAND_OBJECT     *PrevObjDesc;
    PrevObjDesc = NULL;
    ObjDesc = Node->Object;
    while (ObjDesc)
    {
        if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_DATA) &&
            (ObjDesc->Data.Handler == Handler))
        {
            if (PrevObjDesc)
            {
                PrevObjDesc->Common.NextObject = ObjDesc->Common.NextObject;
            }
            else
            {
                Node->Object = ObjDesc->Common.NextObject;
            }
            AcpiUtRemoveReference (ObjDesc);
            return (AE_OK);
        }
        PrevObjDesc = ObjDesc;
        ObjDesc = ObjDesc->Common.NextObject;
    }
    return (AE_NOT_FOUND);
}
ACPI_STATUS AcpiNsDetachData ( ACPI_NAMESPACE_NODE * Node , ACPI_OBJECT_HANDLER Handler ) { ACPI_OPERAND_OBJECT * ObjDesc ; ACPI_OPERAND_OBJECT * PrevObjDesc ; PrevObjDesc = NULL ; ObjDesc = Node -> Object ; while ( ObjDesc ) { if ( ( ObjDesc -> Common . Type == ACPI_TYPE_LOCAL_DATA ) && ( ObjDesc -> Data . Handler == Handler ) ) { if ( PrevObjDesc ) { PrevObjDesc -> Common . NextObject = ObjDesc -> Common . NextObject ; } else { Node -> Object = ObjDesc -> Common . NextObject ; } AcpiUtRemoveReference ( ObjDesc ) ; return ( AE_OK ) ; } PrevObjDesc = ObjDesc ; ObjDesc = ObjDesc -> Common . NextObject ; } return ( AE_NOT_FOUND ) ; }
FUNCTION:    AcpiNsDetachData
 PARAMETERS:  Node            - Namespace node
              Handler         - Handler associated with the data
FUNCTION : AcpiNsDetachData PARAMETERS : Node - Namespace node Handler - Handler associated with the data