summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/components/namespace/nsrepair.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/components/namespace/nsrepair.c')
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsrepair.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/sys/contrib/dev/acpica/components/namespace/nsrepair.c b/sys/contrib/dev/acpica/components/namespace/nsrepair.c
index b4c2c99..a0d4935 100644
--- a/sys/contrib/dev/acpica/components/namespace/nsrepair.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsrepair.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -114,6 +114,11 @@ static const ACPI_SIMPLE_REPAIR_INFO AcpiObjectRepairInfo[] =
ACPI_NOT_PACKAGE_ELEMENT,
AcpiNsConvertToResource },
+ /* Object reference conversions */
+
+ { "_DEP", ACPI_RTYPE_STRING, ACPI_ALL_PACKAGE_ELEMENTS,
+ AcpiNsConvertToReference },
+
/* Unicode conversions */
{ "_MLS", ACPI_RTYPE_STRING, 1,
@@ -174,7 +179,8 @@ AcpiNsSimpleRepair (
ACPI_WARN_ALWAYS, "Missing expected return value"));
}
- Status = Predefined->ObjectConverter (ReturnObject, &NewObject);
+ Status = Predefined->ObjectConverter (Info->Node, ReturnObject,
+ &NewObject);
if (ACPI_FAILURE (Status))
{
/* A fatal error occurred during a conversion */
@@ -222,7 +228,7 @@ AcpiNsSimpleRepair (
ACPI_WARN_ALWAYS, "Found unexpected NULL package element"));
Status = AcpiNsRepairNullElement (Info, ExpectedBtypes,
- PackageIndex, ReturnObjectPtr);
+ PackageIndex, ReturnObjectPtr);
if (ACPI_SUCCESS (Status))
{
return (AE_OK); /* Repair was successful */
@@ -373,13 +379,15 @@ AcpiNsMatchSimpleRepair (
/* Check if we can actually repair this name/type combination */
if ((ReturnBtype & ThisName->UnexpectedBtypes) &&
- (PackageIndex == ThisName->PackageIndex))
+ (ThisName->PackageIndex == ACPI_ALL_PACKAGE_ELEMENTS ||
+ PackageIndex == ThisName->PackageIndex))
{
return (ThisName);
}
return (NULL);
}
+
ThisName++;
}
@@ -464,11 +472,13 @@ AcpiNsRepairNullElement (
/* Set the reference count according to the parent Package object */
- NewObject->Common.ReferenceCount = Info->ParentPackage->Common.ReferenceCount;
+ NewObject->Common.ReferenceCount =
+ Info->ParentPackage->Common.ReferenceCount;
ACPI_DEBUG_PRINT ((ACPI_DB_REPAIR,
"%s: Converted NULL package element to expected %s at index %u\n",
- Info->FullPathname, AcpiUtGetObjectTypeName (NewObject), PackageIndex));
+ Info->FullPathname, AcpiUtGetObjectTypeName (NewObject),
+ PackageIndex));
*ReturnObjectPtr = NewObject;
Info->ReturnFlags |= ACPI_OBJECT_REPAIRED;
@@ -551,6 +561,7 @@ AcpiNsRemoveNullElements (
*Dest = *Source;
Dest++;
}
+
Source++;
}
@@ -607,8 +618,8 @@ AcpiNsWrapWithPackage (
/*
- * Create the new outer package and populate it. The new package will
- * have a single element, the lone sub-object.
+ * Create the new outer package and populate it. The new
+ * package will have a single element, the lone sub-object.
*/
PkgObjDesc = AcpiUtCreatePackageObject (1);
if (!PkgObjDesc)
OpenPOWER on IntegriCloud