FreeBSD/sys/contrib/dev/acpica/compiler/aslmaputils.c
/*******************************************************************************
 *
 * FUNCTION:    MpGetDdnValue
 *
 * PARAMETERS:  DeviceName          - Namepath for parent device
 *
 * RETURN:      _DDN description string. NULL on failure.
 *
 * DESCRIPTION: Execute the _DDN method for the device.
 *
 ******************************************************************************/
MpGetDdnValue
PARAMETERS:  DeviceName          - Namepath for parent device

_DDN description string. NULL on failure.

Execute the _DDN method for the device.
MpGetDdnValue PARAMETERS : DeviceName - Namepath for parent device _DDN description string . NULL on failure . Execute the _DDN method for the device .
char *
MpGetDdnValue (
    char                    *DeviceName)
{
    ACPI_NAMESPACE_NODE     *DeviceNode;
    ACPI_NAMESPACE_NODE     *DdnNode;
    ACPI_STATUS             Status;
    Status = AcpiNsGetNode (NULL, DeviceName, ACPI_NS_NO_UPSEARCH,
        &DeviceNode);
    if (ACPI_FAILURE (Status))
    {
        goto ErrorExit;
    }
    Status = AcpiNsGetNode (DeviceNode, METHOD_NAME__DDN, ACPI_NS_NO_UPSEARCH,
        &DdnNode);
    if (ACPI_FAILURE (Status))
    {
        goto ErrorExit;
    }
    if ((DdnNode->Type != ACPI_TYPE_STRING) ||
        !DdnNode->Object)
    {
        goto ErrorExit;
    }
    return (DdnNode->Object->String.Pointer);
ErrorExit:
    return (NULL);
}
char * MpGetDdnValue ( char * DeviceName ) { ACPI_NAMESPACE_NODE * DeviceNode ; ACPI_NAMESPACE_NODE * DdnNode ; ACPI_STATUS Status ; Status = AcpiNsGetNode ( NULL , DeviceName , ACPI_NS_NO_UPSEARCH , & DeviceNode ) ; if ( ACPI_FAILURE ( Status ) ) { goto ErrorExit ; } Status = AcpiNsGetNode ( DeviceNode , METHOD_NAME__DDN , ACPI_NS_NO_UPSEARCH , & DdnNode ) ; if ( ACPI_FAILURE ( Status ) ) { goto ErrorExit ; } if ( ( DdnNode -> Type != ACPI_TYPE_STRING ) || ! DdnNode -> Object ) { goto ErrorExit ; } return ( DdnNode -> Object -> String . Pointer ) ; ErrorExit : return ( NULL ) ; }
FUNCTION:    MpGetDdnValue
 PARAMETERS:  DeviceName          - Namepath for parent device
FUNCTION : MpGetDdnValue PARAMETERS : DeviceName - Namepath for parent device