]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c
Add missing status code in several modules.
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbMouseAbsolutePointerDxe / UsbMouseAbsolutePointer.c
index 3540cd4a0fcec7a5881b4ba77d04180da5e2e936..9fc971c4fcc68b32114698b1eb3d7c1958deffd5 100644 (file)
@@ -526,8 +526,6 @@ InitializeUsbMouseDevice (
   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
@@ -587,15 +585,15 @@ InitializeUsbMouseDevice (
         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
@@ -673,23 +671,6 @@ InitializeUsbMouseDevice (
     }\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