]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.c
MdeModulePkg: add support for ORICO PEUS3-2P card
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbKbDxe / KeyBoard.c
index 09f1b04c814298557d42bef4406a8234003189ee..ee774ff35fb699149634490f9ed8b2d21f7c5d12 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Helper functions for USB Keyboard Driver.\r
 \r
-Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>\r
 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
@@ -833,29 +833,28 @@ InitUSBKeyboard (
              );\r
   if (EFI_ERROR (Status)) {\r
     ConfigValue = 0x01;\r
-  }\r
-\r
-  //\r
-  // Uses default configuration to configure the USB Keyboard device.\r
-  //\r
-  Status = UsbSetConfiguration (\r
-             UsbKeyboardDevice->UsbIo,\r
-             ConfigValue,\r
-             &TransferResult\r
-             );\r
-  if (EFI_ERROR (Status)) {\r
     //\r
-    // If configuration could not be set here, it means\r
-    // the keyboard interface has some errors and could\r
-    // not be initialized\r
+    // Uses default configuration to configure the USB Keyboard device.\r
     //\r
-    REPORT_STATUS_CODE_WITH_DEVICE_PATH (\r
-      EFI_ERROR_CODE | EFI_ERROR_MINOR,\r
-      (EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_INTERFACE_ERROR),\r
-      UsbKeyboardDevice->DevicePath\r
-      );\r
+    Status = UsbSetConfiguration (\r
+               UsbKeyboardDevice->UsbIo,\r
+               ConfigValue,\r
+               &TransferResult\r
+               );\r
+    if (EFI_ERROR (Status)) {\r
+      //\r
+      // If configuration could not be set here, it means\r
+      // the keyboard interface has some errors and could\r
+      // not be initialized\r
+      //\r
+      REPORT_STATUS_CODE_WITH_DEVICE_PATH (\r
+        EFI_ERROR_CODE | EFI_ERROR_MINOR,\r
+        (EFI_PERIPHERAL_KEYBOARD | EFI_P_EC_INTERFACE_ERROR),\r
+        UsbKeyboardDevice->DevicePath\r
+        );\r
 \r
-    return EFI_DEVICE_ERROR;\r
+      return EFI_DEVICE_ERROR;\r
+    }\r
   }\r
 \r
   UsbGetProtocolRequest (\r