diff --git a/reactos/drivers/video/videoprt/dispatch.c b/reactos/drivers/video/videoprt/dispatch.c index d0642e001ff..0f9d12e8f2a 100644 --- a/reactos/drivers/video/videoprt/dispatch.c +++ b/reactos/drivers/video/videoprt/dispatch.c @@ -340,11 +340,9 @@ IntVideoPortPnPStartDevice( /* Save the resource list */ ResourceCount = AllocatedResources->List[0].PartialResourceList.Count; - ResourceListSize = sizeof(CM_RESOURCE_LIST); - - if (ResourceCount > 1) - ResourceListSize += (ResourceCount-1) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR); - + ResourceListSize = + FIELD_OFFSET(CM_RESOURCE_LIST, List[0].PartialResourceList. + PartialDescriptors[ResourceCount]); DeviceExtension->AllocatedResources = ExAllocatePool(PagedPool, ResourceListSize); if (DeviceExtension->AllocatedResources == NULL) { @@ -360,6 +358,9 @@ IntVideoPortPnPStartDevice( FullList < AllocatedResources->List + AllocatedResources->Count; FullList++) { + INFO_(VIDEOPRT, "InterfaceType %u BusNumber List %u Device BusNumber %u Version %u Revision %u\n", + FullList->InterfaceType, FullList->BusNumber, DeviceExtension->SystemIoBusNumber, FullList->PartialResourceList.Version, FullList->PartialResourceList.Revision); + /* FIXME: Is this ASSERT ok for resources from the PNP manager? */ ASSERT(FullList->InterfaceType == PCIBus && FullList->BusNumber == DeviceExtension->SystemIoBusNumber && diff --git a/reactos/drivers/video/videoprt/resource.c b/reactos/drivers/video/videoprt/resource.c index 4bac62be053..2ab6a28cc1a 100644 --- a/reactos/drivers/video/videoprt/resource.c +++ b/reactos/drivers/video/videoprt/resource.c @@ -520,6 +520,9 @@ VideoPortGetAccessRanges( FullList < AllocatedResources->List + AllocatedResources->Count; FullList++) { + INFO_(VIDEOPRT, "InterfaceType %u BusNumber List %u Device BusNumber %u Version %u Revision %u\n", + FullList->InterfaceType, FullList->BusNumber, DeviceExtension->SystemIoBusNumber, FullList->PartialResourceList.Version, FullList->PartialResourceList.Revision); + ASSERT(FullList->InterfaceType == PCIBus && FullList->BusNumber == DeviceExtension->SystemIoBusNumber && 1 == FullList->PartialResourceList.Version &&