EFI_STATUS Status;\r
EFI_USB_HID_DESCRIPTOR *MouseHidDesc;\r
UINT8 *ReportDesc;\r
- UINT8 ReportId;\r
- UINT8 Duration;\r
EFI_USB_CONFIG_DESCRIPTOR ConfigDesc;\r
VOID *Buf;\r
UINT32 TransferResult;\r
Start = TRUE;\r
}\r
}\r
- if ((Start == TRUE) && (Head->Type == USB_DESC_TYPE_ENDPOINT)) {\r
+ if (Start && (Head->Type == USB_DESC_TYPE_ENDPOINT)) {\r
break;\r
}\r
- if ((Start == TRUE) && (Head->Type == USB_DESC_TYPE_HID)) {\r
+ if (Start && (Head->Type == USB_DESC_TYPE_HID)) {\r
MouseHidDesc = (EFI_USB_HID_DESCRIPTOR *)Head;\r
break;\r
}\r
- Total += (UINT16)Head->Len;\r
- Head = (USB_DESC_HEAD*)((UINT8 *)Buf + Total);\r
+ Total = Total + (UINT16)Head->Len;\r
+ Head = (USB_DESC_HEAD*)((UINT8 *)Buf + Total);\r
}\r
\r
if (MouseHidDesc == NULL) {\r
}\r
}\r
\r
- //\r
- // ReportId is zero, which means the idle rate applies to all input reports.\r
- //\r
- ReportId = 0;\r
- //\r
- // Duration is zero, which means the duration is infinite.\r
- // so the endpoint will inhibit reporting forever,\r
- // and only reporting when a change is detected in the report data.\r
- //\r
- Duration = 0;\r
- UsbSetIdleRequest (\r
- UsbIo,\r
- UsbMouseAbsolutePointerDev->InterfaceDescriptor.InterfaceNumber,\r
- ReportId,\r
- Duration\r
- );\r
-\r
FreePool (Buf);\r
FreePool (ReportDesc);\r
\r