Retired gSimpleTextInExNotifyGuid, used local structure address to be notify handle.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7666 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -640,19 +640,10 @@ KeyboardRegisterKeyNotify (
|
||||
|
||||
NewNotify->Signature = KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
|
||||
NewNotify->KeyNotificationFn = KeyNotificationFunction;
|
||||
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
|
||||
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
|
||||
InsertTailList (&ConsoleInDev->NotifyList, &NewNotify->NotifyEntry);
|
||||
|
||||
//
|
||||
// Use gSimpleTextInExNotifyGuid to get a valid EFI_HANDLE
|
||||
//
|
||||
Status = gBS->InstallMultipleProtocolInterfaces (
|
||||
&NewNotify->NotifyHandle,
|
||||
&gSimpleTextInExNotifyGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
*NotifyHandle = NewNotify->NotifyHandle;
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
@@ -694,18 +685,6 @@ KeyboardUnregisterKeyNotify (
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
NotificationHandle,
|
||||
&gSimpleTextInExNotifyGuid,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
ConsoleInDev = TEXT_INPUT_EX_KEYBOARD_CONSOLE_IN_DEV_FROM_THIS (This);
|
||||
|
||||
//
|
||||
@@ -725,13 +704,7 @@ KeyboardUnregisterKeyNotify (
|
||||
// Remove the notification function from NotifyList and free resources
|
||||
//
|
||||
RemoveEntryList (&CurrentNotify->NotifyEntry);
|
||||
Status = gBS->UninstallMultipleProtocolInterfaces (
|
||||
CurrentNotify->NotifyHandle,
|
||||
&gSimpleTextInExNotifyGuid,
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
gBS->FreePool (CurrentNotify);
|
||||
Status = EFI_SUCCESS;
|
||||
goto Exit;
|
||||
|
@@ -23,7 +23,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#include <Protocol/IsaIo.h>
|
||||
#include <Protocol/DevicePath.h>
|
||||
#include <Protocol/Ps2Policy.h>
|
||||
#include <Protocol/SimpleTextInExNotify.h>
|
||||
|
||||
#include <Library/UefiDriverEntryPoint.h>
|
||||
#include <Library/UefiLib.h>
|
||||
|
@@ -60,7 +60,5 @@
|
||||
gEfiSimpleTextInProtocolGuid # PROTOCOL BY_START
|
||||
gEfiSimpleTextInputExProtocolGuid # PROTOCOL BY_START
|
||||
gEfiDevicePathProtocolGuid # PROTOCOL TO_START
|
||||
gSimpleTextInExNotifyGuid # PROTOCOL SOMETIMES_CONSUMED
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user