/* Destroy all the pci device node under the bridge. Bridge itself is not included. */
VOID DestroyPciDeviceTree(IN PCI_IO_DEVICE *Bridge)
/* Destroy all the pci device node under the bridge. Bridge itself is not included. */
VOID DestroyPciDeviceTree(IN PCI_IO_DEVICE *Bridge)
{
  LIST_ENTRY     *CurrentLink;
  PCI_IO_DEVICE  *Temp;
  while (!IsListEmpty (&Bridge->ChildList)) {
    CurrentLink = Bridge->ChildList.ForwardLink;
    RemoveEntryList (CurrentLink);
    Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink);
    if (!IsListEmpty (&Temp->ChildList)) {
      DestroyPciDeviceTree (Temp);
    }
    FreePciDevice (Temp);
  }
}