Change the type of NotifyHandle from EFI_HANDLE to VOID * for SimpleTextInEx protocol.
Clean up the code to remove unnecessary NotifyHandle in the private data structure. Signed-off-by: Ruiyu Ni<ruiyu.ni@intel.com> Reviewed-by: Elvin Li<elvin.li@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13565 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -822,7 +822,7 @@ WinNtGopSimpleTextInExRegisterKeyNotify (
|
||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||
IN EFI_KEY_DATA *KeyData,
|
||||
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
|
||||
OUT EFI_HANDLE *NotifyHandle
|
||||
OUT VOID **NotifyHandle
|
||||
)
|
||||
/*++
|
||||
|
||||
@@ -867,7 +867,7 @@ WinNtGopSimpleTextInExRegisterKeyNotify (
|
||||
);
|
||||
if (GopPrivateIsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
|
||||
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
|
||||
*NotifyHandle = CurrentNotify->NotifyHandle;
|
||||
*NotifyHandle = CurrentNotify;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -883,11 +883,10 @@ WinNtGopSimpleTextInExRegisterKeyNotify (
|
||||
|
||||
NewNotify->Signature = WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE;
|
||||
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
||||
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
|
||||
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
|
||||
InsertTailList (&Private->NotifyList, &NewNotify->NotifyEntry);
|
||||
|
||||
*NotifyHandle = NewNotify->NotifyHandle;
|
||||
*NotifyHandle = NewNotify;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
||||
@@ -897,7 +896,7 @@ EFI_STATUS
|
||||
EFIAPI
|
||||
WinNtGopSimpleTextInExUnregisterKeyNotify (
|
||||
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
|
||||
IN EFI_HANDLE NotificationHandle
|
||||
IN VOID *NotificationHandle
|
||||
)
|
||||
/*++
|
||||
|
||||
@@ -931,7 +930,7 @@ WinNtGopSimpleTextInExUnregisterKeyNotify (
|
||||
NotifyEntry,
|
||||
WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE
|
||||
);
|
||||
if (CurrentNotify->NotifyHandle == NotificationHandle) {
|
||||
if (CurrentNotify == NotificationHandle) {
|
||||
//
|
||||
// Remove the notification function from NotifyList and free resources
|
||||
//
|
||||
|
Reference in New Issue
Block a user