Ejemplo n.º 1
0
/**
  Free the resource used by USB interface.

  @param  UsbIf                 The USB interface to free.

**/
VOID
UsbFreeInterface (
  IN USB_INTERFACE        *UsbIf
  )
{
  UsbCloseHostProtoByChild (UsbIf->Device->Bus, UsbIf->Handle);

  gBS->UninstallMultipleProtocolInterfaces (
         UsbIf->Handle,
         &gEfiDevicePathProtocolGuid,
         UsbIf->DevicePath,
         &gEfiUsbIoProtocolGuid,
         &UsbIf->UsbIo,
         NULL
         );

  if (UsbIf->DevicePath != NULL) {
    FreePool (UsbIf->DevicePath);
  }

  FreePool (UsbIf);
}
Ejemplo n.º 2
0
STATIC
VOID
UsbFreeInterface (
  IN USB_INTERFACE        *UsbIf
  )
/*++

Routine Description:

  Free the resource used by USB interface

Arguments:

  UsbIf - The USB interface to free

Returns:

  None

--*/
{
  UsbCloseHostProtoByChild (UsbIf->Device->Bus, UsbIf->Handle);

  gBS->UninstallMultipleProtocolInterfaces (
         UsbIf->Handle,
         &gEfiDevicePathProtocolGuid,
         UsbIf->DevicePath,
         &gEfiUsbIoProtocolGuid,
         &UsbIf->UsbIo,
         NULL
         );

  if (UsbIf->DevicePath != NULL) {
    gBS->FreePool (UsbIf->DevicePath);
  }

  gBS->FreePool (UsbIf);
}