X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FBus%2FUsb%2FUsbKbDxe%2Fefikey.c;h=55cf88c0cc6e9a443e7fad4be3ad58c4e1dc690b;hp=3ea788cdadc322711c08dafe6c654b2993ead4a5;hb=d01c093a582c001ae3817706b3d664e9ea3d00ba;hpb=ed838d0c5ec4d4f2f1c1898fff1c6c619ff46352 diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c index 3ea788cdad..55cf88c0cc 100644 --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/efikey.c @@ -98,7 +98,7 @@ USBKeyboardCheckForKey ( ); EFI_GUID gEfiUsbKeyboardDriverGuid = { - 0xa05f5f78, 0xfb3, 0x4d10, 0x90, 0x90, 0xac, 0x4, 0x6e, 0xeb, 0x7c, 0x3c + 0xa05f5f78, 0xfb3, 0x4d10, {0x90, 0x90, 0xac, 0x4, 0x6e, 0xeb, 0x7c, 0x3c} }; // @@ -113,8 +113,6 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbKeyboardDriverBinding = { NULL }; -//@MT: EFI_DRIVER_ENTRY_POINT (USBKeyboardDriverBindingEntryPoint) - EFI_STATUS EFIAPI USBKeyboardDriverBindingEntryPoint ( @@ -174,7 +172,7 @@ USBKeyboardDriverBindingSupported ( OpenStatus = gBS->OpenProtocol ( Controller, &gEfiUsbIoProtocolGuid, - &UsbIo, + (VOID **) &UsbIo, This->DriverBindingHandle, Controller, EFI_OPEN_PROTOCOL_BY_DRIVER @@ -244,7 +242,7 @@ USBKeyboardDriverBindingStart ( Status = gBS->OpenProtocol ( Controller, &gEfiUsbIoProtocolGuid, - &UsbIo, + (VOID **) &UsbIo, This->DriverBindingHandle, Controller, EFI_OPEN_PROTOCOL_BY_DRIVER @@ -330,7 +328,7 @@ USBKeyboardDriverBindingStart ( // // We only care interrupt endpoint here // - UsbKeyboardDevice->IntEndpointDescriptor = EndpointDescriptor; + CopyMem(&UsbKeyboardDevice->IntEndpointDescriptor, &EndpointDescriptor, sizeof(EndpointDescriptor)); Found = TRUE; } } @@ -500,12 +498,11 @@ USBKeyboardDriverBindingStop ( EFI_STATUS Status; EFI_SIMPLE_TEXT_INPUT_PROTOCOL *SimpleInput; USB_KB_DEV *UsbKeyboardDevice; - EFI_USB_IO_PROTOCOL *UsbIo; Status = gBS->OpenProtocol ( Controller, &gEfiSimpleTextInProtocolGuid, - &SimpleInput, + (VOID **) &SimpleInput, This->DriverBindingHandle, Controller, EFI_OPEN_PROTOCOL_BY_DRIVER @@ -526,7 +523,6 @@ USBKeyboardDriverBindingStop ( Controller ); - UsbIo = UsbKeyboardDevice->UsbIo; // // Uninstall the Asyn Interrupt Transfer from this device // will disable the key data input from this device @@ -605,12 +601,9 @@ USBKeyboardReset ( { EFI_STATUS Status; USB_KB_DEV *UsbKeyboardDevice; - EFI_USB_IO_PROTOCOL *UsbIo; UsbKeyboardDevice = USB_KB_DEV_FROM_THIS (This); - UsbIo = UsbKeyboardDevice->UsbIo; - KbdReportStatusCode ( UsbKeyboardDevice->DevicePath, EFI_PROGRESS_CODE,