]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Bus/Pci/Uhci/Dxe/ComponentName.c
fix a typo in a comment
[mirror_edk2.git] / EdkModulePkg / Bus / Pci / Uhci / Dxe / ComponentName.c
index 71d9339a8fb36078e327b193848cac5af4ca5326..b6209e42955fc19ea5584b497e99c718e1fc6d8d 100644 (file)
@@ -19,27 +19,6 @@ Abstract:
 \r
 #include "uhci.h"\r
 \r
-//\r
-// EFI Component Name Functions\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-UhciComponentNameGetDriverName (\r
-  IN  EFI_COMPONENT_NAME_PROTOCOL     *This,\r
-  IN  CHAR8                           *Language,\r
-  OUT CHAR16                          **DriverName\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-UhciComponentNameGetControllerName (\r
-  IN  EFI_COMPONENT_NAME_PROTOCOL     *This,\r
-  IN  EFI_HANDLE                      ControllerHandle,\r
-  IN  EFI_HANDLE                      ChildHandle, OPTIONAL\r
-  IN  CHAR8                           *Language,\r
-  OUT CHAR16                          **ControllerName\r
-  );\r
-\r
 //\r
 // EFI Component Name Protocol\r
 //\r
@@ -162,6 +141,17 @@ UhciComponentNameGetControllerName (
     return EFI_UNSUPPORTED;\r
   }\r
   //\r
+  // Make sure this driver is currently managing ControllerHandle\r
+  //\r
+  Status = EfiTestManagedDevice (\r
+             ControllerHandle,\r
+             gUhciDriverBinding.DriverBindingHandle,\r
+             &gEfiPciIoProtocolGuid\r
+             );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+  //\r
   // Get the device context\r
   //\r
   Status = gBS->OpenProtocol (\r