@param State Variable to return the hub port state.\r
\r
@retval EFI_SUCCESS The port state is returned in State.\r
- @retval Others Failed to retrive the port state.\r
+ @retval Others Failed to retrieve the port state.\r
\r
**/\r
EFI_STATUS\r
USB_DEVICE *HubDev;\r
EFI_STATUS Status;\r
UINT8 Index;\r
+ UINT8 NumEndpoints;\r
\r
//\r
// Locate the interrupt endpoint for port change map\r
Setting = HubIf->IfSetting;\r
HubDev = HubIf->Device;\r
EpDesc = NULL;\r
+ NumEndpoints = Setting->Desc.NumEndpoints;\r
\r
- for (Index = 0; Index < Setting->Desc.NumEndpoints; Index++) {\r
+ for (Index = 0; Index < NumEndpoints; Index++) {\r
ASSERT ((Setting->Endpoints != NULL) && (Setting->Endpoints[Index] != NULL));\r
\r
EpDesc = Setting->Endpoints[Index];\r
}\r
}\r
\r
- if (Index == Setting->Desc.NumEndpoints) {\r
+ if (Index == NumEndpoints) {\r
DEBUG (( EFI_D_ERROR, "UsbHubInit: no interrupt endpoint found for hub %d\n", HubDev->Address));\r
return EFI_DEVICE_ERROR;\r
}\r
\r
\r
/**\r
- Interface funtion to reset the port.\r
+ Interface function to reset the port.\r
\r
@param HubIf The hub interface.\r
@param Port The port to reset.\r
\r
@param HubIf The root hub interface.\r
\r
- @retval EFI_SUCCESS The interface is initialied for root hub.\r
+ @retval EFI_SUCCESS The interface is initialized for root hub.\r
@retval Others Failed to initialize the hub.\r
\r
**/\r
\r
\r
/**\r
- Interface funtion to reset the root hub port.\r
+ Interface function to reset the root hub port.\r
\r
@param RootIf The root hub interface.\r
@param Port The port to reset.\r