]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c
1. Sync Tcp4 protocol definitions to match UEFI 2.1
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbKbDxe / efikey.c
index 3ea788cdadc322711c08dafe6c654b2993ead4a5..55cf88c0cc6e9a443e7fad4be3ad58c4e1dc690b 100644 (file)
@@ -98,7 +98,7 @@ USBKeyboardCheckForKey (
   );\r
 \r
 EFI_GUID  gEfiUsbKeyboardDriverGuid = {\r
-  0xa05f5f78, 0xfb3, 0x4d10, 0x90, 0x90, 0xac, 0x4, 0x6e, 0xeb, 0x7c, 0x3c\r
+  0xa05f5f78, 0xfb3, 0x4d10, {0x90, 0x90, 0xac, 0x4, 0x6e, 0xeb, 0x7c, 0x3c}\r
 };\r
 \r
 //\r
@@ -113,8 +113,6 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbKeyboardDriverBinding = {
   NULL\r
 };\r
 \r
-//@MT: EFI_DRIVER_ENTRY_POINT (USBKeyboardDriverBindingEntryPoint)\r
-\r
 EFI_STATUS\r
 EFIAPI\r
 USBKeyboardDriverBindingEntryPoint (\r
@@ -174,7 +172,7 @@ USBKeyboardDriverBindingSupported (
   OpenStatus = gBS->OpenProtocol (\r
                       Controller,\r
                       &gEfiUsbIoProtocolGuid,\r
-                      &UsbIo,\r
+                      (VOID **) &UsbIo,\r
                       This->DriverBindingHandle,\r
                       Controller,\r
                       EFI_OPEN_PROTOCOL_BY_DRIVER\r
@@ -244,7 +242,7 @@ USBKeyboardDriverBindingStart (
   Status = gBS->OpenProtocol (\r
                   Controller,\r
                   &gEfiUsbIoProtocolGuid,\r
-                  &UsbIo,\r
+                  (VOID **) &UsbIo,\r
                   This->DriverBindingHandle,\r
                   Controller,\r
                   EFI_OPEN_PROTOCOL_BY_DRIVER\r
@@ -330,7 +328,7 @@ USBKeyboardDriverBindingStart (
       //\r
       // We only care interrupt endpoint here\r
       //\r
-      UsbKeyboardDevice->IntEndpointDescriptor  = EndpointDescriptor;\r
+      CopyMem(&UsbKeyboardDevice->IntEndpointDescriptor, &EndpointDescriptor, sizeof(EndpointDescriptor));\r
       Found = TRUE;\r
     }\r
   }\r
@@ -500,12 +498,11 @@ USBKeyboardDriverBindingStop (
   EFI_STATUS                  Status;\r
   EFI_SIMPLE_TEXT_INPUT_PROTOCOL *SimpleInput;\r
   USB_KB_DEV                  *UsbKeyboardDevice;\r
-  EFI_USB_IO_PROTOCOL         *UsbIo;\r
 \r
   Status = gBS->OpenProtocol (\r
                   Controller,\r
                   &gEfiSimpleTextInProtocolGuid,\r
-                  &SimpleInput,\r
+                  (VOID **) &SimpleInput,\r
                   This->DriverBindingHandle,\r
                   Controller,\r
                   EFI_OPEN_PROTOCOL_BY_DRIVER\r
@@ -526,7 +523,6 @@ USBKeyboardDriverBindingStop (
         Controller\r
         );\r
 \r
-  UsbIo = UsbKeyboardDevice->UsbIo;\r
   //\r
   // Uninstall the Asyn Interrupt Transfer from this device\r
   // will disable the key data input from this device\r
@@ -605,12 +601,9 @@ USBKeyboardReset (
 {\r
   EFI_STATUS          Status;\r
   USB_KB_DEV          *UsbKeyboardDevice;\r
-  EFI_USB_IO_PROTOCOL *UsbIo;\r
 \r
   UsbKeyboardDevice = USB_KB_DEV_FROM_THIS (This);\r
 \r
-  UsbIo             = UsbKeyboardDevice->UsbIo;\r
-\r
   KbdReportStatusCode (\r
     UsbKeyboardDevice->DevicePath,\r
     EFI_PROGRESS_CODE,\r