/* Free the UHCI device and release its associated resources. */
VOID UhciFreeDev(IN USB_HC_DEV *Uhc)
/* Free the UHCI device and release its associated resources. */
VOID UhciFreeDev(IN USB_HC_DEV *Uhc)
{
  if (Uhc->AsyncIntMonitor != NULL) {
    gBS->CloseEvent (Uhc->AsyncIntMonitor);
  }
  if (Uhc->ExitBootServiceEvent != NULL) {
    gBS->CloseEvent (Uhc->ExitBootServiceEvent);
  }
  if (Uhc->MemPool != NULL) {
    UsbHcFreeMemPool (Uhc->MemPool);
  }
  if (Uhc->CtrlNameTable != NULL) {
    FreeUnicodeStringTable (Uhc->CtrlNameTable);
  }
  FreePool (Uhc);
}