/* Remove one device in the global device list. */
VOID RemoveDevice(IN OPAL_DRIVER_DEVICE *Dev)
/* Remove one device in the global device list. */
VOID RemoveDevice(IN OPAL_DRIVER_DEVICE *Dev)
{
  OPAL_DRIVER_DEVICE  *TmpDev;
  if (mOpalDriver.DeviceList == NULL) {
    return;
  }
  if (mOpalDriver.DeviceList == Dev) {
    mOpalDriver.DeviceList = NULL;
    return;
  }
  TmpDev = mOpalDriver.DeviceList;
  while (TmpDev->Next != NULL) {
    if (TmpDev->Next == Dev) {
      TmpDev->Next = Dev->Next;
      break;
    }
  }
}