diff options
Diffstat (limited to 'MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c')
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c index 7ff7f1ca67..da6ce75b3a 100644 --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c @@ -256,7 +256,7 @@ USBKeyboardDriverBindingStart ( UsbKeyboardDevice->SimpleInputEx.ReadKeyStrokeEx = USBKeyboardReadKeyStrokeEx;
UsbKeyboardDevice->SimpleInputEx.SetState = USBKeyboardSetState;
UsbKeyboardDevice->SimpleInputEx.RegisterKeyNotify = USBKeyboardRegisterKeyNotify;
- UsbKeyboardDevice->SimpleInputEx.UnregisterKeyNotify = USBKeyboardUnregisterKeyNotify;
+ UsbKeyboardDevice->SimpleInputEx.UnregisterKeyNotify = USBKeyboardUnregisterKeyNotify;
InitializeListHead (&UsbKeyboardDevice->NotifyList);
@@ -279,12 +279,6 @@ USBKeyboardDriverBindingStart ( UsbKeyboardDevice,
&(UsbKeyboardDevice->SimpleInput.WaitForKey)
);
-
- if (EFI_ERROR (Status)) {
- goto ErrorExit;
- }
-
- Status = InitKeyboardLayout (UsbKeyboardDevice);
if (EFI_ERROR (Status)) {
goto ErrorExit;
}
@@ -308,6 +302,21 @@ USBKeyboardDriverBindingStart ( goto ErrorExit;
}
+ UsbKeyboardDevice->ControllerHandle = Controller;
+ Status = InitKeyboardLayout (UsbKeyboardDevice);
+ if (EFI_ERROR (Status)) {
+ gBS->UninstallMultipleProtocolInterfaces (
+ Controller,
+ &gEfiSimpleTextInProtocolGuid,
+ &UsbKeyboardDevice->SimpleInput,
+ &gEfiSimpleTextInputExProtocolGuid,
+ &UsbKeyboardDevice->SimpleInputEx,
+ NULL
+ );
+ goto ErrorExit;
+ }
+
+
//
// Reset USB Keyboard Device exhaustively.
//
|