/* This function gets controller name from Component Name 2 protocol interface and Component Name protocol interface in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the controller name. If the attempt fails, it then gets the controller name from EFI 1.1 Component Name protocol for backward compatibility support. */
CHAR16* DriverHealthManagerGetControllerName(IN EFI_HANDLE DriverBindingHandle, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle)
/* This function gets controller name from Component Name 2 protocol interface and Component Name protocol interface in turn. It first tries UEFI 2.0 Component Name 2 protocol interface and try to get the controller name. If the attempt fails, it then gets the controller name from EFI 1.1 Component Name protocol for backward compatibility support. */
CHAR16* DriverHealthManagerGetControllerName(IN EFI_HANDLE DriverBindingHandle, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle)
{
  EFI_STATUS  Status;
  CHAR16      *ControllerName;
  Status = DriverHealthManagerGetControllerNameWorker (
             &gEfiComponentName2ProtocolGuid,
             DriverBindingHandle,
             ControllerHandle,
             ChildHandle,
             &ControllerName
             );
  if (EFI_ERROR (Status)) {
    Status = DriverHealthManagerGetControllerNameWorker (
               &gEfiComponentNameProtocolGuid,
               DriverBindingHandle,
               ControllerHandle,
               ChildHandle,
               &ControllerName
               );
  }
  if (!EFI_ERROR (Status)) {
    return AllocateCopyPool (StrSize (ControllerName), ControllerName);
  } else {
    return ConvertDevicePathToText (DevicePathFromHandle (ChildHandle != NULL ? ChildHandle : ControllerHandle), FALSE, TRUE);
  }
}