aboutsummaryrefslogtreecommitdiffstats
path: root/source/common/dmextern.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/common/dmextern.c')
-rw-r--r--source/common/dmextern.c30
1 files changed, 23 insertions, 7 deletions
diff --git a/source/common/dmextern.c b/source/common/dmextern.c
index 37c34fc5dab1..d509c8ae9256 100644
--- a/source/common/dmextern.c
+++ b/source/common/dmextern.c
@@ -454,12 +454,12 @@ AcpiDmAddToExternalList (
NewExternal->InternalPath = Path;
- /* Link the new descriptor into the global list, ordered by string length */
+ /* Link the new descriptor into the global list, alphabetically ordered */
NextExternal = AcpiGbl_ExternalList;
while (NextExternal)
{
- if (NewExternal->Length <= NextExternal->Length)
+ if (AcpiUtStricmp (NewExternal->Path, NextExternal->Path) < 0)
{
if (PrevExternal)
{
@@ -508,7 +508,7 @@ AcpiDmAddExternalsToNamespace (
{
ACPI_STATUS Status;
ACPI_NAMESPACE_NODE *Node;
- ACPI_OPERAND_OBJECT *MethodDesc;
+ ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_EXTERNAL_LIST *External = AcpiGbl_ExternalList;
@@ -527,13 +527,29 @@ AcpiDmAddExternalsToNamespace (
"while adding external to namespace [%s]",
External->Path));
}
- else if (External->Type == ACPI_TYPE_METHOD)
+
+ else switch (External->Type)
{
+ case ACPI_TYPE_METHOD:
+
/* For methods, we need to save the argument count */
- MethodDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD);
- MethodDesc->Method.ParamCount = (UINT8) External->Value;
- Node->Object = MethodDesc;
+ ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD);
+ ObjDesc->Method.ParamCount = (UINT8) External->Value;
+ Node->Object = ObjDesc;
+ break;
+
+ case ACPI_TYPE_REGION:
+
+ /* Regions require a region sub-object */
+
+ ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION);
+ ObjDesc->Region.Node = Node;
+ Node->Object = ObjDesc;
+ break;
+
+ default:
+ break;
}
External = External->Next;