X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FBus%2FIsa%2FPs2KeyboardDxe%2FComponentName.c;h=3d2e9de67ba63edc4c10d03bf079aabe443d6b60;hp=e64e46bb45d706c645029a28196f663f4c68e2ea;hb=HEAD;hpb=4aa68cbc97e06d93a82189ade1317104f95535c1 diff --git a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/ComponentName.c b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/ComponentName.c index e64e46bb45..d36e2becd6 100644 --- a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/ComponentName.c +++ b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/ComponentName.c @@ -2,13 +2,7 @@ Routines related Component Name protocol. Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -17,6 +11,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // // EFI Component Name Functions // + /** Retrieves a Unicode string that is the user readable name of the driver. @@ -64,7 +59,6 @@ Ps2KeyboardComponentNameGetDriverName ( OUT CHAR16 **DriverName ); - /** Retrieves a Unicode string that is the user readable name of the controller that is being managed by a driver. @@ -136,14 +130,13 @@ Ps2KeyboardComponentNameGetDriverName ( EFI_STATUS EFIAPI Ps2KeyboardComponentNameGetControllerName ( - IN EFI_COMPONENT_NAME_PROTOCOL *This, - IN EFI_HANDLE ControllerHandle, - IN EFI_HANDLE ChildHandle OPTIONAL, - IN CHAR8 *Language, - OUT CHAR16 **ControllerName + IN EFI_COMPONENT_NAME_PROTOCOL *This, + IN EFI_HANDLE ControllerHandle, + IN EFI_HANDLE ChildHandle OPTIONAL, + IN CHAR8 *Language, + OUT CHAR16 **ControllerName ); - // // EFI Component Name Protocol // @@ -156,14 +149,13 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gPs2KeyboardComponent // // EFI Component Name 2 Protocol // -GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gPs2KeyboardComponentName2 = { - (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) Ps2KeyboardComponentNameGetDriverName, - (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) Ps2KeyboardComponentNameGetControllerName, +GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gPs2KeyboardComponentName2 = { + (EFI_COMPONENT_NAME2_GET_DRIVER_NAME)Ps2KeyboardComponentNameGetDriverName, + (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)Ps2KeyboardComponentNameGetControllerName, "en" }; - -GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mPs2KeyboardDriverNameTable[] = { +GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mPs2KeyboardDriverNameTable[] = { { "eng;en", L"PS/2 Keyboard Driver" @@ -301,16 +293,17 @@ Ps2KeyboardComponentNameGetDriverName ( EFI_STATUS EFIAPI Ps2KeyboardComponentNameGetControllerName ( - IN EFI_COMPONENT_NAME_PROTOCOL *This, - IN EFI_HANDLE ControllerHandle, - IN EFI_HANDLE ChildHandle OPTIONAL, - IN CHAR8 *Language, - OUT CHAR16 **ControllerName + IN EFI_COMPONENT_NAME_PROTOCOL *This, + IN EFI_HANDLE ControllerHandle, + IN EFI_HANDLE ChildHandle OPTIONAL, + IN CHAR8 *Language, + OUT CHAR16 **ControllerName ) { - EFI_STATUS Status; - EFI_SIMPLE_TEXT_INPUT_PROTOCOL *ConIn; - KEYBOARD_CONSOLE_IN_DEV *ConsoleIn; + EFI_STATUS Status; + EFI_SIMPLE_TEXT_INPUT_PROTOCOL *ConIn; + KEYBOARD_CONSOLE_IN_DEV *ConsoleIn; + // // This is a device driver, so ChildHandle must be NULL. // @@ -325,13 +318,14 @@ Ps2KeyboardComponentNameGetControllerName ( if (EFI_ERROR (Status)) { return Status; } + // // Get the device context // Status = gBS->OpenProtocol ( ControllerHandle, &gEfiSimpleTextInProtocolGuid, - (VOID **) &ConIn, + (VOID **)&ConIn, gKeyboardControllerDriver.DriverBindingHandle, ControllerHandle, EFI_OPEN_PROTOCOL_GET_PROTOCOL