/* Unload the RamDiskDxe driver and its configuration form. */
EFI_STATUS EFIAPI RamDiskDxeUnload(IN EFI_HANDLE ImageHandle)
/* Unload the RamDiskDxe driver and its configuration form. */
EFI_STATUS EFIAPI RamDiskDxeUnload(IN EFI_HANDLE ImageHandle)
{
  EFI_STATUS                    Status;
  RAM_DISK_CONFIG_PRIVATE_DATA  *ConfigPrivate;
  Status = gBS->HandleProtocol (
                  mRamDiskHandle,
                  &gEfiCallerIdGuid,
                  (VOID **)&ConfigPrivate
                  );
  if (EFI_ERROR (Status)) {
    return Status;
  }
  ASSERT (ConfigPrivate->Signature == RAM_DISK_CONFIG_PRIVATE_DATA_SIGNATURE);
  UnregisterAllRamDisks ();
  gBS->UninstallMultipleProtocolInterfaces (
         mRamDiskHandle,
         &gEfiRamDiskProtocolGuid,
         &mRamDiskProtocol,
         &gEfiCallerIdGuid,
         ConfigPrivate,
         NULL
         );
  UninstallRamDiskConfigForm (ConfigPrivate);
  return EFI_SUCCESS;
}