)\r
{\r
USB_ENDPOINT_DESC *EpDesc;\r
- UINTN Index;\r
-\r
- for (Index = 0; Index < UsbIf->IfSetting->Desc.NumEndpoints; Index++) {\r
+ UINT8 Index;\r
+ UINT8 NumEndpoints;\r
+ \r
+ NumEndpoints = UsbIf->IfSetting->Desc.NumEndpoints;\r
+ \r
+ for (Index = 0; Index < NumEndpoints; Index++) {\r
EpDesc = UsbIf->IfSetting->Endpoints[Index];\r
\r
if (EpDesc->Desc.EndpointAddress == EpAddr) {\r
);\r
\r
if (UsbIf->DevicePath != NULL) {\r
- gBS->FreePool (UsbIf->DevicePath);\r
+ FreePool (UsbIf->DevicePath);\r
}\r
\r
- gBS->FreePool (UsbIf);\r
+ FreePool (UsbIf);\r
}\r
\r
\r
\r
ON_ERROR:\r
if (UsbIf->DevicePath != NULL) {\r
- gBS->FreePool (UsbIf->DevicePath);\r
+ FreePool (UsbIf->DevicePath);\r
}\r
\r
- gBS->FreePool (UsbIf);\r
+ FreePool (UsbIf);\r
return NULL;\r
}\r
\r
\r
/**\r
Connect the USB interface with its driver. EFI USB bus will\r
- create a USB interface for each seperate interface descriptor.\r
+ create a USB interface for each separate interface descriptor.\r
\r
@param UsbIf The interface to connect driver to.\r
\r