EFI_STATUS Status;\r
UINT8 KeyCode; \r
LIST_ENTRY *Link;\r
+ LIST_ENTRY *NotifyList;\r
KEYBOARD_CONSOLE_IN_EX_NOTIFY *CurrentNotify; \r
EFI_KEY_DATA OriginalKeyData;\r
\r
//\r
// Invoke notification functions if the key is registered.\r
//\r
- for (Link = GetFirstNode (&UsbKeyboardDevice->NotifyList);\r
- !IsNull (&UsbKeyboardDevice->NotifyList, Link);\r
- Link = GetNextNode (&UsbKeyboardDevice->NotifyList, Link)) {\r
+ NotifyList = &UsbKeyboardDevice->NotifyList;\r
+ for (Link = GetFirstNode (NotifyList);\r
+ !IsNull (NotifyList, Link);\r
+ Link = GetNextNode (NotifyList, Link)) {\r
CurrentNotify = CR (Link, KEYBOARD_CONSOLE_IN_EX_NOTIFY, NotifyEntry, USB_KB_CONSOLE_IN_EX_NOTIFY_SIGNATURE);\r
if (IsKeyRegistered (&CurrentNotify->KeyData, &OriginalKeyData)) { \r
CurrentNotify->KeyNotificationFn (&OriginalKeyData);\r
}\r
\r
/**\r
- Reset the input device and optionaly run diagnostics\r
+ Reset the input device and optionally run diagnostics\r
\r
There are 2 types of reset for USB keyboard.\r
For non-exhaustive reset, only keyboard buffer is cleared.\r
\r
@retval EFI_SUCCESS The keystroke information was returned.\r
@retval EFI_NOT_READY There was no keystroke data availiable.\r
- @retval EFI_DEVICE_ERROR The keydtroke information was not returned due to\r
+ @retval EFI_DEVICE_ERROR The keystroke information was not returned due to\r
hardware errors.\r
\r
**/\r
@param InputData A pointer to keystroke data for the key that was pressed.\r
\r
@retval TRUE Key pressed matches a registered key.\r
- @retval FLASE Key pressed does not matche a registered key.\r
+ @retval FLASE Key pressed does not matches a registered key.\r
\r
**/\r
BOOLEAN\r
@param NotifyHandle Points to the unique handle assigned to the registered notification.\r
\r
@retval EFI_SUCCESS The notification function was registered successfully.\r
- @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data structures.\r
+ @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necessary data structures.\r
@retval EFI_INVALID_PARAMETER KeyData or NotifyHandle or KeyNotificationFunction is NULL.\r
\r
**/\r
EFI_STATUS Status;\r
KEYBOARD_CONSOLE_IN_EX_NOTIFY *NewNotify;\r
LIST_ENTRY *Link;\r
+ LIST_ENTRY *NotifyList;\r
KEYBOARD_CONSOLE_IN_EX_NOTIFY *CurrentNotify; \r
\r
if (KeyData == NULL || NotifyHandle == NULL || KeyNotificationFunction == NULL) {\r
//\r
// Return EFI_SUCCESS if the (KeyData, NotificationFunction) is already registered.\r
//\r
- for (Link = GetFirstNode (&UsbKeyboardDevice->NotifyList);\r
- !IsNull (&UsbKeyboardDevice->NotifyList, Link);\r
- Link = GetNextNode (&UsbKeyboardDevice->NotifyList, Link)) {\r
+ NotifyList = &UsbKeyboardDevice->NotifyList;\r
+ \r
+ for (Link = GetFirstNode (NotifyList);\r
+ !IsNull (NotifyList, Link);\r
+ Link = GetNextNode (NotifyList, Link)) {\r
CurrentNotify = CR (\r
Link, \r
KEYBOARD_CONSOLE_IN_EX_NOTIFY, \r
EFI_STATUS Status;\r
KEYBOARD_CONSOLE_IN_EX_NOTIFY *CurrentNotify;\r
LIST_ENTRY *Link;\r
+ LIST_ENTRY *NotifyList;\r
\r
if (NotificationHandle == NULL) {\r
return EFI_INVALID_PARAMETER;\r
//\r
// Traverse notify list of USB keyboard and remove the entry of NotificationHandle.\r
//\r
- for (Link = GetFirstNode (&UsbKeyboardDevice->NotifyList);\r
- !IsNull (&UsbKeyboardDevice->NotifyList, Link);\r
- Link = GetNextNode (&UsbKeyboardDevice->NotifyList, Link)) {\r
+ NotifyList = &UsbKeyboardDevice->NotifyList;\r
+ for (Link = GetFirstNode (NotifyList);\r
+ !IsNull (NotifyList, Link);\r
+ Link = GetNextNode (NotifyList, Link)) {\r
CurrentNotify = CR (\r
Link, \r
KEYBOARD_CONSOLE_IN_EX_NOTIFY, \r
)\r
{\r
LIST_ENTRY *Link;\r
+ LIST_ENTRY *NsKeyList;\r
USB_NS_KEY *UsbNsKey;\r
-\r
- Link = GetFirstNode (&UsbKeyboardDevice->NsKeyList);\r
- while (!IsNull (&UsbKeyboardDevice->NsKeyList, Link)) {\r
+ \r
+ NsKeyList = &UsbKeyboardDevice->NsKeyList;\r
+ Link = GetFirstNode (NsKeyList);\r
+ while (!IsNull (NsKeyList, Link)) {\r
UsbNsKey = USB_NS_KEY_FORM_FROM_LINK (Link);\r
\r
if (UsbNsKey->NsKey[0].Key == KeyDescriptor->Key) {\r
return UsbNsKey;\r
}\r
\r
- Link = GetNextNode (&UsbKeyboardDevice->NsKeyList, Link);\r
+ Link = GetNextNode (NsKeyList, Link);\r
}\r
\r
return NULL;\r
KeyDescriptor = GetKeyDescriptor (UsbKeyboardDevice, 0x28);\r
CopyMem (TableEntry, KeyDescriptor, sizeof (EFI_KEY_DESCRIPTOR));\r
\r
- gBS->FreePool (KeyboardLayout);\r
+ FreePool (KeyboardLayout);\r
}\r
\r
/**\r
);\r
\r
//\r
- // Set repeate rate for next repeat key generation.\r
+ // Set repeat rate for next repeat key generation.\r
//\r
gBS->SetTimer (\r
UsbKeyboardDevice->RepeatTimer,\r