/* Removes Protocol from the protocol list (but not the handle list). */
PROTOCOL_INTERFACE* SmmRemoveInterfaceFromProtocol(IN IHANDLE *Handle, IN EFI_GUID *Protocol, IN VOID *Interface)
/* Removes Protocol from the protocol list (but not the handle list). */
PROTOCOL_INTERFACE* SmmRemoveInterfaceFromProtocol(IN IHANDLE *Handle, IN EFI_GUID *Protocol, IN VOID *Interface)
{
  PROTOCOL_INTERFACE  *Prot;
  PROTOCOL_NOTIFY     *ProtNotify;
  PROTOCOL_ENTRY      *ProtEntry;
  LIST_ENTRY          *Link;
  Prot = SmmFindProtocolInterface (Handle, Protocol, Interface);
  if (Prot != NULL) {
    ProtEntry = Prot->Protocol;
    for (Link = ProtEntry->Notify.ForwardLink; Link != &ProtEntry->Notify; Link = Link->ForwardLink) {
      ProtNotify = CR (Link, PROTOCOL_NOTIFY, Link, PROTOCOL_NOTIFY_SIGNATURE);
      if (ProtNotify->Position == &Prot->ByProtocol) {
        ProtNotify->Position = Prot->ByProtocol.BackLink;
      }
    }
    RemoveEntryList (&Prot->ByProtocol);
  }
  return Prot;
}