/* Compare two resource nodes and get the larger resource consumer. */
PCI_RESOURCE_NODE* GetLargerConsumerDevice(IN PCI_RESOURCE_NODE *PciResNode1, IN PCI_RESOURCE_NODE *PciResNode2)
/* Compare two resource nodes and get the larger resource consumer. */
PCI_RESOURCE_NODE* GetLargerConsumerDevice(IN PCI_RESOURCE_NODE *PciResNode1, IN PCI_RESOURCE_NODE *PciResNode2)
{
  if (PciResNode2 == NULL) {
    return PciResNode1;
  }
  if (  (IS_PCI_BRIDGE (&(PciResNode2->PciDev->Pci)) || (PciResNode2->PciDev->Parent == NULL)) \
     && (PciResNode2->ResourceUsage != PciResUsagePadding))
  {
    return PciResNode1;
  }
  if (PciResNode1 == NULL) {
    return PciResNode2;
  }
  if ((PciResNode1->Length) > (PciResNode2->Length)) {
    return PciResNode1;
  }
  return PciResNode2;
}