]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c
Merged in the following trackers from EDK:
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbKbDxe / efikey.c
index eee3827c2324ad12ff1acdf8494d2c9460cc8335..50413bd500b0807bbb1dfc18047180d9cd41770d 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2004 - 2007, Intel Corporation\r
+Copyright (c) 2004 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -382,6 +382,11 @@ USBKeyboardDriverBindingStart (
     goto ErrorExit;\r
   }\r
 \r
+  Status = InitKeyboardLayout (UsbKeyboardDevice);\r
+  if (EFI_ERROR (Status)) {\r
+    goto ErrorExit;\r
+  }\r
+\r
   Status = gBS->CreateEvent (\r
                   EVT_NOTIFY_WAIT,\r
                   TPL_NOTIFY,\r
@@ -573,7 +578,7 @@ USBKeyboardDriverBindingStop (
                   (VOID **) &SimpleInput,\r
                   This->DriverBindingHandle,\r
                   Controller,\r
-                  EFI_OPEN_PROTOCOL_BY_DRIVER\r
+                  EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
                   );\r
   if (EFI_ERROR (Status)) {\r
     return EFI_UNSUPPORTED;\r
@@ -650,6 +655,9 @@ USBKeyboardDriverBindingStop (
   gBS->CloseEvent (UsbKeyboardDevice->SimpleInputEx.WaitForKeyEx);  \r
   KbdFreeNotifyList (&UsbKeyboardDevice->NotifyList);    \r
 \r
+  ReleaseKeyboardLayoutResources (UsbKeyboardDevice);\r
+  gBS->CloseEvent (UsbKeyboardDevice->KeyboardLayoutEvent);\r
+\r
   if (UsbKeyboardDevice->ControllerNameTable != NULL) {\r
     FreeUnicodeStringTable (UsbKeyboardDevice->ControllerNameTable);\r
   }\r