Print this page
update to acpica-unix2-20140114
update to acpica-unix2-20130927
acpica-unix2-20130823
PANKOVs restructure
   1 /*******************************************************************************
   2  *
   3  * Module Name: nsxfobj - Public interfaces to the ACPI subsystem
   4  *                         ACPI Object oriented interfaces
   5  *
   6  ******************************************************************************/
   7 
   8 /*
   9  * Copyright (C) 2000 - 2011, Intel Corp.
  10  * All rights reserved.
  11  *
  12  * Redistribution and use in source and binary forms, with or without
  13  * modification, are permitted provided that the following conditions
  14  * are met:
  15  * 1. Redistributions of source code must retain the above copyright
  16  *    notice, this list of conditions, and the following disclaimer,
  17  *    without modification.
  18  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  19  *    substantially similar to the "NO WARRANTY" disclaimer below
  20  *    ("Disclaimer") and any redistribution must be conditioned upon
  21  *    including a substantially similar Disclaimer requirement for further
  22  *    binary redistribution.
  23  * 3. Neither the names of the above-listed copyright holders nor the names
  24  *    of any contributors may be used to endorse or promote products derived
  25  *    from this software without specific prior written permission.
  26  *
  27  * Alternatively, this software may be distributed under the terms of the
  28  * GNU General Public License ("GPL") version 2 as published by the Free
  29  * Software Foundation.
  30  *
  31  * NO WARRANTY
  32  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  33  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  34  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
  35  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  36  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  37  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  38  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  39  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  40  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  41  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  42  * POSSIBILITY OF SUCH DAMAGES.
  43  */
  44 
  45 
  46 #define __NSXFOBJ_C__

  47 
  48 #include "acpi.h"
  49 #include "accommon.h"
  50 #include "acnamesp.h"
  51 
  52 
  53 #define _COMPONENT          ACPI_NAMESPACE
  54         ACPI_MODULE_NAME    ("nsxfobj")
  55 
  56 /*******************************************************************************
  57  *
  58  * FUNCTION:    AcpiGetType
  59  *
  60  * PARAMETERS:  Handle          - Handle of object whose type is desired
  61  *              RetType         - Where the type will be placed
  62  *
  63  * RETURN:      Status
  64  *
  65  * DESCRIPTION: This routine returns the type associatd with a particular handle
  66  *


 265     Node = AcpiNsGetNextNodeTyped (Type, ParentNode, ChildNode);
 266     if (!Node)
 267     {
 268         Status = AE_NOT_FOUND;
 269         goto UnlockAndExit;
 270     }
 271 
 272     if (RetHandle)
 273     {
 274         *RetHandle = ACPI_CAST_PTR (ACPI_HANDLE, Node);
 275     }
 276 
 277 
 278 UnlockAndExit:
 279 
 280     (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
 281     return (Status);
 282 }
 283 
 284 ACPI_EXPORT_SYMBOL (AcpiGetNextObject)
 285 
   1 /*******************************************************************************
   2  *
   3  * Module Name: nsxfobj - Public interfaces to the ACPI subsystem
   4  *                         ACPI Object oriented interfaces
   5  *
   6  ******************************************************************************/
   7 
   8 /*
   9  * Copyright (C) 2000 - 2014, Intel Corp.
  10  * All rights reserved.
  11  *
  12  * Redistribution and use in source and binary forms, with or without
  13  * modification, are permitted provided that the following conditions
  14  * are met:
  15  * 1. Redistributions of source code must retain the above copyright
  16  *    notice, this list of conditions, and the following disclaimer,
  17  *    without modification.
  18  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  19  *    substantially similar to the "NO WARRANTY" disclaimer below
  20  *    ("Disclaimer") and any redistribution must be conditioned upon
  21  *    including a substantially similar Disclaimer requirement for further
  22  *    binary redistribution.
  23  * 3. Neither the names of the above-listed copyright holders nor the names
  24  *    of any contributors may be used to endorse or promote products derived
  25  *    from this software without specific prior written permission.
  26  *
  27  * Alternatively, this software may be distributed under the terms of the
  28  * GNU General Public License ("GPL") version 2 as published by the Free
  29  * Software Foundation.
  30  *
  31  * NO WARRANTY
  32  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  33  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  34  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
  35  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  36  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  37  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  38  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  39  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  40  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  41  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  42  * POSSIBILITY OF SUCH DAMAGES.
  43  */
  44 
  45 
  46 #define __NSXFOBJ_C__
  47 #define EXPORT_ACPI_INTERFACES
  48 
  49 #include "acpi.h"
  50 #include "accommon.h"
  51 #include "acnamesp.h"
  52 
  53 
  54 #define _COMPONENT          ACPI_NAMESPACE
  55         ACPI_MODULE_NAME    ("nsxfobj")
  56 
  57 /*******************************************************************************
  58  *
  59  * FUNCTION:    AcpiGetType
  60  *
  61  * PARAMETERS:  Handle          - Handle of object whose type is desired
  62  *              RetType         - Where the type will be placed
  63  *
  64  * RETURN:      Status
  65  *
  66  * DESCRIPTION: This routine returns the type associatd with a particular handle
  67  *


 266     Node = AcpiNsGetNextNodeTyped (Type, ParentNode, ChildNode);
 267     if (!Node)
 268     {
 269         Status = AE_NOT_FOUND;
 270         goto UnlockAndExit;
 271     }
 272 
 273     if (RetHandle)
 274     {
 275         *RetHandle = ACPI_CAST_PTR (ACPI_HANDLE, Node);
 276     }
 277 
 278 
 279 UnlockAndExit:
 280 
 281     (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
 282     return (Status);
 283 }
 284 
 285 ACPI_EXPORT_SYMBOL (AcpiGetNextObject)