/* This function unregisters a function which will be called whenever a new ACPI table is installed. */
EFI_STATUS SdtUnregisterNotify(IN EFI_ACPI_NOTIFICATION_FN Notification)
/* This function unregisters a function which will be called whenever a new ACPI table is installed. */
EFI_STATUS SdtUnregisterNotify(IN EFI_ACPI_NOTIFICATION_FN Notification)
{
  EFI_ACPI_TABLE_INSTANCE  *AcpiTableInstance;
  EFI_ACPI_NOTIFY_LIST     *CurrentNotifyList;
  LIST_ENTRY               *CurrentLink;
  LIST_ENTRY               *StartLink;
  AcpiTableInstance = SdtGetAcpiTableInstance ();
  StartLink   = &AcpiTableInstance->NotifyList;
  CurrentLink = StartLink->ForwardLink;
  while (CurrentLink != StartLink) {
    CurrentNotifyList = EFI_ACPI_NOTIFY_LIST_FROM_LINK (CurrentLink);
    if (CurrentNotifyList->Notification == Notification) {
      RemoveEntryList (&(CurrentNotifyList->Link));
      FreePool (CurrentNotifyList);
      return EFI_SUCCESS;
    }
    CurrentLink = CurrentLink->ForwardLink;
  }
  return EFI_INVALID_PARAMETER;
}