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

@@ -3861,6 +3861,7 @@ ConSplitterTextInRegisterKeyNotify (
}
NewNotify->Signature = TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData));
//
@@ -3881,17 +3882,6 @@ ConSplitterTextInRegisterKeyNotify (
}
}
//
// Use gSimpleTextInExNotifyGuid to get a valid EFI_HANDLE
//
Status = gBS->InstallMultipleProtocolInterfaces (
&NewNotify->NotifyHandle,
&gSimpleTextInExNotifyGuid,
NULL,
NULL
);
ASSERT_EFI_ERROR (Status);
InsertTailList (&mConIn.NotifyList, &NewNotify->NotifyEntry);
*NotifyHandle = NewNotify->NotifyHandle;
@@ -3931,18 +3921,6 @@ ConSplitterTextInUnregisterKeyNotify (
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;
}
Private = TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS (This);
//
@@ -3966,13 +3944,7 @@ ConSplitterTextInUnregisterKeyNotify (
}
}
RemoveEntryList (&CurrentNotify->NotifyEntry);
Status = gBS->UninstallMultipleProtocolInterfaces (
CurrentNotify->NotifyHandle,
&gSimpleTextInExNotifyGuid,
NULL,
NULL
);
ASSERT_EFI_ERROR (Status);
gBS->FreePool (CurrentNotify->NotifyHandleList);
gBS->FreePool (CurrentNotify);
return EFI_SUCCESS;