summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/tbget.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/tbget.c')
-rw-r--r--sys/contrib/dev/acpica/tbget.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/contrib/dev/acpica/tbget.c b/sys/contrib/dev/acpica/tbget.c
index 9dc70b6..01fac0e 100644
--- a/sys/contrib/dev/acpica/tbget.c
+++ b/sys/contrib/dev/acpica/tbget.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbget - ACPI Table get* routines
- * $Revision: 83 $
+ * $Revision: 84 $
*
*****************************************************************************/
@@ -547,18 +547,19 @@ AcpiTbGetTablePtr (
*/
if (Instance == 1)
{
- /*
- * Just pluck the pointer out of the global table!
- * Will be null if no table is present
- */
- *TablePtrLoc = AcpiGbl_AcpiTables[TableType].Pointer;
+ /* Get the first */
+
+ if (AcpiGbl_TableLists[TableType].Next)
+ {
+ *TablePtrLoc = AcpiGbl_TableLists[TableType].Next->Pointer;
+ }
return_ACPI_STATUS (AE_OK);
}
/*
* Check for instance out of range
*/
- if (Instance > AcpiGbl_AcpiTables[TableType].Count)
+ if (Instance > AcpiGbl_TableLists[TableType].Count)
{
return_ACPI_STATUS (AE_NOT_EXIST);
}
@@ -570,7 +571,7 @@ AcpiTbGetTablePtr (
* need to walk from the 2nd table until we reach the Instance
* that the user is looking for and return its table pointer.
*/
- TableDesc = AcpiGbl_AcpiTables[TableType].Next;
+ TableDesc = AcpiGbl_TableLists[TableType].Next;
for (i = 2; i < Instance; i++)
{
TableDesc = TableDesc->Next;
OpenPOWER on IntegriCloud