diff options
Diffstat (limited to 'events/evrgnini.c')
| -rw-r--r-- | events/evrgnini.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/events/evrgnini.c b/events/evrgnini.c index 0f894ddc5dd1..187aebe58fe3 100644 --- a/events/evrgnini.c +++ b/events/evrgnini.c @@ -1,7 +1,6 @@ /****************************************************************************** * * Module Name: evrgnini- ACPI AddressSpace (OpRegion) init - * $Revision: 1.88 $ * *****************************************************************************/ @@ -9,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp. * All rights reserved. * * 2. License @@ -118,6 +117,7 @@ #define __EVRGNINI_C__ #include "acpi.h" +#include "accommon.h" #include "acevents.h" #include "acnamesp.h" @@ -335,16 +335,17 @@ AcpiEvPciConfigRegionSetup ( if (Status == AE_SAME_HANDLER) { /* - * It is OK if the handler is already installed on the root - * bridge. Still need to return a context object for the - * new PCI_Config operation region, however. + * It is OK if the handler is already installed on the + * root bridge. Still need to return a context object + * for the new PCI_Config operation region, however. */ Status = AE_OK; } else { ACPI_EXCEPTION ((AE_INFO, Status, - "Could not install PciConfig handler for Root Bridge %4.4s", + "Could not install PciConfig handler " + "for Root Bridge %4.4s", AcpiUtGetNodeName (PciRootNode))); } } @@ -379,8 +380,8 @@ AcpiEvPciConfigRegionSetup ( } /* - * For PCI_Config space access, we need the segment, bus, - * device and function numbers. Acquire them here. + * For PCI_Config space access, we need the segment, bus, device and + * function numbers. Acquire them here. * * Find the parent device object. (This allows the operation region to be * within a subscope under the device, such as a control method.) @@ -393,18 +394,20 @@ AcpiEvPciConfigRegionSetup ( if (!PciDeviceNode) { + ACPI_FREE (PciId); return_ACPI_STATUS (AE_AML_OPERAND_TYPE); } /* - * Get the PCI device and function numbers from the _ADR object - * contained in the parent's scope. + * Get the PCI device and function numbers from the _ADR object contained + * in the parent's scope. */ - Status = AcpiUtEvaluateNumericObject (METHOD_NAME__ADR, PciDeviceNode, &PciValue); + Status = AcpiUtEvaluateNumericObject (METHOD_NAME__ADR, + PciDeviceNode, &PciValue); /* - * The default is zero, and since the allocation above zeroed - * the data, just do nothing on failure. + * The default is zero, and since the allocation above zeroed the data, + * just do nothing on failure. */ if (ACPI_SUCCESS (Status)) { @@ -414,7 +417,8 @@ AcpiEvPciConfigRegionSetup ( /* The PCI segment number comes from the _SEG method */ - Status = AcpiUtEvaluateNumericObject (METHOD_NAME__SEG, PciRootNode, &PciValue); + Status = AcpiUtEvaluateNumericObject (METHOD_NAME__SEG, + PciRootNode, &PciValue); if (ACPI_SUCCESS (Status)) { PciId->Segment = ACPI_LOWORD (PciValue); @@ -422,7 +426,8 @@ AcpiEvPciConfigRegionSetup ( /* The PCI bus number comes from the _BBN method */ - Status = AcpiUtEvaluateNumericObject (METHOD_NAME__BBN, PciRootNode, &PciValue); + Status = AcpiUtEvaluateNumericObject (METHOD_NAME__BBN, + PciRootNode, &PciValue); if (ACPI_SUCCESS (Status)) { PciId->Bus = ACPI_LOWORD (PciValue); @@ -493,12 +498,11 @@ AcpiEvIsPciRootBridge ( ACPI_STATUS Status; ACPI_DEVICE_ID Hid; ACPI_COMPATIBLE_ID_LIST *Cid; - ACPI_NATIVE_UINT i; + UINT32 i; - /* - * Get the _HID and check for a PCI Root Bridge - */ + /* Get the _HID and check for a PCI Root Bridge */ + Status = AcpiUtExecute_HID (Node, &Hid); if (ACPI_FAILURE (Status)) { @@ -510,10 +514,8 @@ AcpiEvIsPciRootBridge ( return (TRUE); } - /* - * The _HID did not match. - * Get the _CID and check for a PCI Root Bridge - */ + /* The _HID did not match. Get the _CID and check for a PCI Root Bridge */ + Status = AcpiUtExecute_CID (Node, &Cid); if (ACPI_FAILURE (Status)) { @@ -651,9 +653,9 @@ AcpiEvDefaultRegionSetup ( * Get the appropriate address space handler for a newly * created region. * - * This also performs address space specific initialization. For + * This also performs address space specific initialization. For * example, PCI regions must have an _ADR object that contains - * a PCI address in the scope of the definition. This address is + * a PCI address in the scope of the definition. This address is * required to perform an access to PCI config space. * * MUTEX: Interpreter should be unlocked, because we may run the _REG @@ -713,7 +715,7 @@ AcpiEvInitializeRegion ( { /* * The _REG method is optional and there can be only one per region - * definition. This will be executed when the handler is attached + * definition. This will be executed when the handler is attached * or removed */ RegionObj2->Extra.Method_REG = MethodNode; @@ -771,8 +773,8 @@ AcpiEvInitializeRegion ( AcpiNsLocked); /* - * Tell all users that this region is usable by running the _REG - * method + * Tell all users that this region is usable by + * running the _REG method */ if (AcpiNsLocked) { @@ -803,10 +805,8 @@ AcpiEvInitializeRegion ( } } - /* - * This node does not have the handler we need; - * Pop up one level - */ + /* This node does not have the handler we need; Pop up one level */ + Node = AcpiNsGetParentNode (Node); } |
