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:
vanjeff
2009-02-25 05:35:12 +00:00
parent 1088908eb2
commit 7fc80d4484
17 changed files with 12 additions and 199 deletions

View File

@@ -719,7 +719,6 @@ WinNtGopSimpleTextInExRegisterKeyNotify (
--*/
{
EFI_STATUS Status;
GOP_PRIVATE_DATA *Private;
WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY *CurrentNotify;
LIST_ENTRY *Link;
@@ -759,20 +758,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 (KeyData));
InsertTailList (&Private->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;
return EFI_SUCCESS;
@@ -801,7 +790,6 @@ WinNtGopSimpleTextInExUnregisterKeyNotify (
--*/
{
EFI_STATUS Status;
GOP_PRIVATE_DATA *Private;
LIST_ENTRY *Link;
WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY *CurrentNotify;
@@ -810,18 +798,6 @@ WinNtGopSimpleTextInExUnregisterKeyNotify (
return EFI_INVALID_PARAMETER;
}
Status = gBS->OpenProtocol (
NotificationHandle,
&gSimpleTextInExNotifyGuid,
(VOID **) NULL,
NULL,
NULL,
EFI_OPEN_PROTOCOL_TEST_PROTOCOL
);
if (EFI_ERROR (Status)) {
return EFI_INVALID_PARAMETER;
}
Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS (This);
for (Link = Private->NotifyList.ForwardLink; Link != &Private->NotifyList; Link = Link->ForwardLink) {
@@ -836,13 +812,7 @@ WinNtGopSimpleTextInExUnregisterKeyNotify (
// 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);
return EFI_SUCCESS;
}