X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FBus%2FUsb%2FUsbKbDxe%2Fefikey.c;h=50413bd500b0807bbb1dfc18047180d9cd41770d;hb=813acf3a9a99e97ab200c7e222ee96810a9aa3fd;hp=eee3827c2324ad12ff1acdf8494d2c9460cc8335;hpb=66aa04e4e3a0b84369cbb483a78c4113b619663a;p=mirror_edk2.git diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c index eee3827c23..50413bd500 100644 --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2004 - 2007, Intel Corporation +Copyright (c) 2004 - 2008, 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 @@ -382,6 +382,11 @@ USBKeyboardDriverBindingStart ( goto ErrorExit; } + Status = InitKeyboardLayout (UsbKeyboardDevice); + if (EFI_ERROR (Status)) { + goto ErrorExit; + } + Status = gBS->CreateEvent ( EVT_NOTIFY_WAIT, TPL_NOTIFY, @@ -573,7 +578,7 @@ USBKeyboardDriverBindingStop ( (VOID **) &SimpleInput, This->DriverBindingHandle, Controller, - EFI_OPEN_PROTOCOL_BY_DRIVER + EFI_OPEN_PROTOCOL_GET_PROTOCOL ); if (EFI_ERROR (Status)) { return EFI_UNSUPPORTED; @@ -650,6 +655,9 @@ USBKeyboardDriverBindingStop ( gBS->CloseEvent (UsbKeyboardDevice->SimpleInputEx.WaitForKeyEx); KbdFreeNotifyList (&UsbKeyboardDevice->NotifyList); + ReleaseKeyboardLayoutResources (UsbKeyboardDevice); + gBS->CloseEvent (UsbKeyboardDevice->KeyboardLayoutEvent); + if (UsbKeyboardDevice->ControllerNameTable != NULL) { FreeUnicodeStringTable (UsbKeyboardDevice->ControllerNameTable); }