X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=OptionRomPkg%2FCirrusLogic5430Dxe%2FComponentName.c;h=3ab4e83c41f687503b7cf367399a143de877bd2a;hp=8fddfc5f76b0d5139538ccc0b74f34b4777f5bdb;hb=0bce7349f5519e364f2463856b5f4c0712be5c9b;hpb=87f8ccbe19e09b6ece2c72bb70add08d0cc627f7 diff --git a/OptionRomPkg/CirrusLogic5430Dxe/ComponentName.c b/OptionRomPkg/CirrusLogic5430Dxe/ComponentName.c index 8fddfc5f76..3ab4e83c41 100644 --- a/OptionRomPkg/CirrusLogic5430Dxe/ComponentName.c +++ b/OptionRomPkg/CirrusLogic5430Dxe/ComponentName.c @@ -61,7 +61,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mCirrusLogic5430Controlle languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. Language is specified - in RFC 3066 or ISO 639-2 language code format. + in RFC 4646 or ISO 639-2 language code format. @param DriverName[out] A pointer to the Unicode string to return. This Unicode string is the name of the @@ -134,7 +134,7 @@ CirrusLogic5430ComponentNameGetDriverName ( languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. Language is specified in - RFC 3066 or ISO 639-2 language code format. + RFC 4646 or ISO 639-2 language code format. @param ControllerName[out] A pointer to the Unicode string to return. This Unicode string is the name of the @@ -175,9 +175,7 @@ CirrusLogic5430ComponentNameGetControllerName ( OUT CHAR16 **ControllerName ) { - EFI_UGA_DRAW_PROTOCOL *UgaDraw; EFI_STATUS Status; - EFI_PCI_IO_PROTOCOL *PciIoProtocol; // // This is a device driver, so ChildHandle must be NULL. @@ -187,42 +185,13 @@ CirrusLogic5430ComponentNameGetControllerName ( } // - // Check Controller's handle + // Make sure this driver is currently managing ControllHandle // - Status = gBS->OpenProtocol ( - ControllerHandle, - &gEfiPciIoProtocolGuid, - (VOID **) &PciIoProtocol, - gCirrusLogic5430DriverBinding.DriverBindingHandle, - ControllerHandle, - EFI_OPEN_PROTOCOL_BY_DRIVER - ); - if (!EFI_ERROR (Status)) { - gBS->CloseProtocol ( - ControllerHandle, - &gEfiPciIoProtocolGuid, - gCirrusLogic5430DriverBinding.DriverBindingHandle, - ControllerHandle - ); - - return EFI_UNSUPPORTED; - } - - if (Status != EFI_ALREADY_STARTED) { - return EFI_UNSUPPORTED; - } - - // - // Get the UGA Draw Protocol on Controller - // - Status = gBS->OpenProtocol ( - ControllerHandle, - &gEfiUgaDrawProtocolGuid, - (VOID **) &UgaDraw, - gCirrusLogic5430DriverBinding.DriverBindingHandle, - ControllerHandle, - EFI_OPEN_PROTOCOL_GET_PROTOCOL - ); + Status = EfiTestManagedDevice ( + ControllerHandle, + gCirrusLogic5430DriverBinding.DriverBindingHandle, + &gEfiPciIoProtocolGuid + ); if (EFI_ERROR (Status)) { return Status; }