From 7fc80d44841dbc1f1b68d75312ab7ec9e6d63613 Mon Sep 17 00:00:00 2001 From: vanjeff Date: Wed, 25 Feb 2009 05:35:12 +0000 Subject: 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 --- .../Universal/Console/ConSplitterDxe/ConSplitter.c | 32 ++------------------ .../Universal/Console/ConSplitterDxe/ConSplitter.h | 1 - .../Console/ConSplitterDxe/ConSplitterDxe.inf | 1 - .../Universal/Console/TerminalDxe/Terminal.h | 1 - .../Universal/Console/TerminalDxe/TerminalConIn.c | 34 ++-------------------- .../Universal/Console/TerminalDxe/TerminalDxe.inf | 1 - 6 files changed, 5 insertions(+), 65 deletions(-) (limited to 'MdeModulePkg/Universal/Console') diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c index e189b7d5c9..78d9e9497f 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c @@ -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; diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h index b4b8f1d322..8c505740c3 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h @@ -28,7 +28,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include -#include #include #include diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf index f33b26af41..10c464f592 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf @@ -87,7 +87,6 @@ gEfiSimpleTextOutProtocolGuid ## BY_START gEfiGraphicsOutputProtocolGuid ## BY_START gEfiUgaDrawProtocolGuid ## BY_START - gSimpleTextInExNotifyGuid ## PRODUCES [FeaturePcd.common] diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h index af3afecd15..e55343c068 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h +++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h @@ -21,7 +21,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include -#include #include #include #include diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c index 4aa8c73f06..ae4ea818de 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c @@ -365,7 +365,6 @@ TerminalConInRegisterKeyNotify ( OUT EFI_HANDLE *NotifyHandle ) { - EFI_STATUS Status; TERMINAL_DEV *TerminalDevice; TERMINAL_CONSOLE_IN_EX_NOTIFY *NewNotify; LIST_ENTRY *Link; @@ -407,18 +406,10 @@ TerminalConInRegisterKeyNotify ( NewNotify->Signature = TERMINAL_CONSOLE_IN_EX_NOTIFY_SIGNATURE; NewNotify->KeyNotificationFn = KeyNotificationFunction; + NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify; CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData)); InsertTailList (&TerminalDevice->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; @@ -445,7 +436,6 @@ TerminalConInUnregisterKeyNotify ( IN EFI_HANDLE NotificationHandle ) { - EFI_STATUS Status; TERMINAL_DEV *TerminalDevice; LIST_ENTRY *Link; TERMINAL_CONSOLE_IN_EX_NOTIFY *CurrentNotify; @@ -455,18 +445,6 @@ TerminalConInUnregisterKeyNotify ( 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; - } - TerminalDevice = TERMINAL_CON_IN_EX_DEV_FROM_THIS (This); NotifyList = &TerminalDevice->NotifyList; @@ -482,13 +460,7 @@ TerminalConInUnregisterKeyNotify ( // 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; } diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf index 204ca6040b..112b19e9f6 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf @@ -72,7 +72,6 @@ gEfiSimpleTextInProtocolGuid ## BY_START gEfiSimpleTextInputExProtocolGuid ## BY_START gEfiSimpleTextOutProtocolGuid ## BY_START - gSimpleTextInExNotifyGuid ## SOMETIMES_CONSUMES gEfiHotPlugDeviceGuid ## SOMETIMES_CONSUMES [Pcd] -- cgit v1.2.3