diff options
Diffstat (limited to 'sys/contrib/dev/acpica/rscreate.c')
-rw-r--r-- | sys/contrib/dev/acpica/rscreate.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/sys/contrib/dev/acpica/rscreate.c b/sys/contrib/dev/acpica/rscreate.c index 51e9934..9769385 100644 --- a/sys/contrib/dev/acpica/rscreate.c +++ b/sys/contrib/dev/acpica/rscreate.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: rscreate - Create resource lists/tables - * $Revision: 53 $ + * $Revision: 57 $ * ******************************************************************************/ @@ -172,11 +172,11 @@ AcpiRsCreateResourceList ( * Pass the ByteStreamBuffer into a module that can calculate * the buffer size needed for the linked list */ - Status = AcpiRsCalculateListLength (ByteStreamStart, ByteStreamBufferLength, + Status = AcpiRsGetListLength (ByteStreamStart, ByteStreamBufferLength, &ListSizeNeeded); ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Status=%X ListSizeNeeded=%X\n", - Status, ListSizeNeeded)); + Status, (UINT32) ListSizeNeeded)); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); @@ -200,7 +200,7 @@ AcpiRsCreateResourceList ( } ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "OutputBuffer %p Length %X\n", - OutputBuffer->Pointer, OutputBuffer->Length)); + OutputBuffer->Pointer, (UINT32) OutputBuffer->Length)); return_ACPI_STATUS (AE_OK); } @@ -253,14 +253,14 @@ AcpiRsCreatePciRoutingTable ( /* * Get the required buffer length */ - Status = AcpiRsCalculatePciRoutingTableLength (PackageObject, + Status = AcpiRsGetPciRoutingTableLength (PackageObject, &BufferSizeNeeded); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); } - ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "BufferSizeNeeded = %X\n", BufferSizeNeeded)); + ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "BufferSizeNeeded = %X\n", (UINT32) BufferSizeNeeded)); /* Validate/Allocate/Clear caller buffer */ @@ -277,7 +277,7 @@ AcpiRsCreatePciRoutingTable ( TopObjectList = PackageObject->Package.Elements; NumberOfElements = PackageObject->Package.Count; Buffer = OutputBuffer->Pointer; - UserPrt = (ACPI_PCI_ROUTING_TABLE *) Buffer; + UserPrt = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, Buffer); for (Index = 0; Index < NumberOfElements; Index++) { @@ -288,7 +288,7 @@ AcpiRsCreatePciRoutingTable ( * be zero because we cleared the return buffer earlier */ Buffer += UserPrt->Length; - UserPrt = (ACPI_PCI_ROUTING_TABLE *) Buffer; + UserPrt = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, Buffer); /* * Fill in the Length field with the information we have at this point. @@ -311,14 +311,14 @@ AcpiRsCreatePciRoutingTable ( /* * 1) First subobject: Dereference the Address */ - if (ACPI_TYPE_INTEGER == (*SubObjectList)->Common.Type) + if (ACPI_GET_OBJECT_TYPE (*SubObjectList) == ACPI_TYPE_INTEGER) { UserPrt->Address = (*SubObjectList)->Integer.Value; } else { ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Need Integer, found %s\n", - AcpiUtGetTypeName ((*SubObjectList)->Common.Type))); + AcpiUtGetObjectTypeName (*SubObjectList))); return_ACPI_STATUS (AE_BAD_DATA); } @@ -327,14 +327,14 @@ AcpiRsCreatePciRoutingTable ( */ SubObjectList++; - if (ACPI_TYPE_INTEGER == (*SubObjectList)->Common.Type) + if (ACPI_GET_OBJECT_TYPE (*SubObjectList) == ACPI_TYPE_INTEGER) { UserPrt->Pin = (UINT32) (*SubObjectList)->Integer.Value; } else { ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Need Integer, found %s\n", - AcpiUtGetTypeName ((*SubObjectList)->Common.Type))); + AcpiUtGetObjectTypeName (*SubObjectList))); return_ACPI_STATUS (AE_BAD_DATA); } @@ -343,7 +343,7 @@ AcpiRsCreatePciRoutingTable ( */ SubObjectList++; - switch ((*SubObjectList)->Common.Type) + switch (ACPI_GET_OBJECT_TYPE (*SubObjectList)) { case INTERNAL_TYPE_REFERENCE: @@ -362,7 +362,7 @@ AcpiRsCreatePciRoutingTable ( (UINT32) ((UINT8 *) UserPrt->Source - (UINT8 *) OutputBuffer->Pointer); PathBuffer.Pointer = UserPrt->Source; - Status = AcpiNsHandleToPathname ((ACPI_HANDLE *) Node, &PathBuffer); + Status = AcpiNsHandleToPathname ((ACPI_HANDLE) Node, &PathBuffer); UserPrt->Length += ACPI_STRLEN (UserPrt->Source) + 1; /* include null terminator */ break; @@ -393,7 +393,7 @@ AcpiRsCreatePciRoutingTable ( default: ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Need Integer, found %s\n", - AcpiUtGetTypeName ((*SubObjectList)->Common.Type))); + AcpiUtGetObjectTypeName (*SubObjectList))); return_ACPI_STATUS (AE_BAD_DATA); } @@ -406,14 +406,14 @@ AcpiRsCreatePciRoutingTable ( */ SubObjectList++; - if (ACPI_TYPE_INTEGER == (*SubObjectList)->Common.Type) + if (ACPI_GET_OBJECT_TYPE (*SubObjectList) == ACPI_TYPE_INTEGER) { UserPrt->SourceIndex = (UINT32) (*SubObjectList)->Integer.Value; } else { ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Need Integer, found %s\n", - AcpiUtGetTypeName ((*SubObjectList)->Common.Type))); + AcpiUtGetObjectTypeName (*SubObjectList))); return_ACPI_STATUS (AE_BAD_DATA); } @@ -423,7 +423,7 @@ AcpiRsCreatePciRoutingTable ( } ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "OutputBuffer %p Length %X\n", - OutputBuffer->Pointer, OutputBuffer->Length)); + OutputBuffer->Pointer, (UINT32) OutputBuffer->Length)); return_ACPI_STATUS (AE_OK); } @@ -466,11 +466,11 @@ AcpiRsCreateByteStream ( * Pass the LinkedListBuffer into a module that calculates * the buffer size needed for the byte stream. */ - Status = AcpiRsCalculateByteStreamLength (LinkedListBuffer, + Status = AcpiRsGetByteStreamLength (LinkedListBuffer, &ByteStreamSizeNeeded); ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "ByteStreamSizeNeeded=%X, %s\n", - ByteStreamSizeNeeded, AcpiFormatException (Status))); + (UINT32) ByteStreamSizeNeeded, AcpiFormatException (Status))); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); @@ -494,7 +494,7 @@ AcpiRsCreateByteStream ( } ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "OutputBuffer %p Length %X\n", - OutputBuffer->Pointer, OutputBuffer->Length)); + OutputBuffer->Pointer, (UINT32) OutputBuffer->Length)); return_ACPI_STATUS (AE_OK); } |