From 7fc80d44841dbc1f1b68d75312ab7ec9e6d63613 Mon Sep 17 00:00:00 2001 From: vanjeff Date: Wed, 25 Feb 2009 05:35:12 +0000 Subject: [PATCH] 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 --- .../Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c | 31 +-------------- .../Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h | 1 - .../Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf | 2 - MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c | 38 ++----------------- MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h | 1 - MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf | 4 -- .../Include/Protocol/SimpleTextInExNotify.h | 25 ------------ MdeModulePkg/MdeModulePkg.dec | 3 -- .../Console/ConSplitterDxe/ConSplitter.c | 32 +--------------- .../Console/ConSplitterDxe/ConSplitter.h | 1 - .../Console/ConSplitterDxe/ConSplitterDxe.inf | 1 - .../Universal/Console/TerminalDxe/Terminal.h | 1 - .../Console/TerminalDxe/TerminalConIn.c | 34 ++--------------- .../Console/TerminalDxe/TerminalDxe.inf | 1 - Nt32Pkg/WinNtGopDxe/WinNtGop.h | 1 - Nt32Pkg/WinNtGopDxe/WinNtGopDxe.inf | 1 - Nt32Pkg/WinNtGopDxe/WinNtGopInput.c | 34 +---------------- 17 files changed, 12 insertions(+), 199 deletions(-) delete mode 100644 MdeModulePkg/Include/Protocol/SimpleTextInExNotify.h diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c index fc613cac4f..637d054953 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c @@ -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; diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h index 79314e43de..a029ef910f 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h @@ -23,7 +23,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include -#include #include #include diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf index 10a5c396dd..fb277f7347 100644 --- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf +++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf @@ -60,7 +60,5 @@ gEfiSimpleTextInProtocolGuid # PROTOCOL BY_START gEfiSimpleTextInputExProtocolGuid # PROTOCOL BY_START gEfiDevicePathProtocolGuid # PROTOCOL TO_START - gSimpleTextInExNotifyGuid # PROTOCOL SOMETIMES_CONSUMED - diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c index 07fec7c315..c78305e780 100644 --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c @@ -1022,7 +1022,6 @@ USBKeyboardRegisterKeyNotify ( ) { USB_KB_DEV *UsbKeyboardDevice; - EFI_STATUS Status; KEYBOARD_CONSOLE_IN_EX_NOTIFY *NewNotify; LIST_ENTRY *Link; LIST_ENTRY *NotifyList; @@ -1066,20 +1065,11 @@ USBKeyboardRegisterKeyNotify ( NewNotify->Signature = USB_KB_CONSOLE_IN_EX_NOTIFY_SIGNATURE; NewNotify->KeyNotificationFn = KeyNotificationFunction; + NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify; CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA)); InsertTailList (&UsbKeyboardDevice->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; @@ -1105,7 +1095,6 @@ USBKeyboardUnregisterKeyNotify ( ) { USB_KB_DEV *UsbKeyboardDevice; - EFI_STATUS Status; KEYBOARD_CONSOLE_IN_EX_NOTIFY *CurrentNotify; LIST_ENTRY *Link; LIST_ENTRY *NotifyList; @@ -1116,21 +1105,6 @@ USBKeyboardUnregisterKeyNotify ( UsbKeyboardDevice = TEXT_INPUT_EX_USB_KB_DEV_FROM_THIS (This); - // - // Check if NotificationHandle is returned from RegisterKeyNotify(). - // - Status = gBS->OpenProtocol ( - NotificationHandle, - &gSimpleTextInExNotifyGuid, - NULL, - NULL, - NULL, - EFI_OPEN_PROTOCOL_TEST_PROTOCOL - ); - if (EFI_ERROR (Status)) { - return EFI_INVALID_PARAMETER; - } - // // Traverse notify list of USB keyboard and remove the entry of NotificationHandle. // @@ -1149,13 +1123,7 @@ USBKeyboardUnregisterKeyNotify ( // Remove the notification function from NotifyList and free resources // RemoveEntryList (&CurrentNotify->NotifyEntry); - Status = gBS->UninstallMultipleProtocolInterfaces ( - CurrentNotify->NotifyHandle, - &gSimpleTextInExNotifyGuid, - NULL, - NULL - ); - ASSERT_EFI_ERROR (Status); + FreePool (CurrentNotify); return EFI_SUCCESS; } diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h index 73191e6a27..ec240457b5 100644 --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h @@ -22,7 +22,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include -#include #include diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf b/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf index b2953fb9cf..f5701a834d 100644 --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf @@ -84,10 +84,6 @@ # Otherwise, USB keyboard module tries to use its carried default layout. # gEfiHiiDatabaseProtocolGuid ## SOMETIMES_CONSUMES (Default value is used if it's absent.) - ## - # SimpleTextInExNotify is installed on the handle created by EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.RegisterKeyNotify(). - # - gSimpleTextInExNotifyGuid ## PRODUCES [FeaturePcd.common] gEfiMdeModulePkgTokenSpaceGuid.PcdDisableDefaultKeyboardLayoutInUsbKbDriver ## SOMETIME_CONSUMES (Checked when no layout is provided by HII.) diff --git a/MdeModulePkg/Include/Protocol/SimpleTextInExNotify.h b/MdeModulePkg/Include/Protocol/SimpleTextInExNotify.h deleted file mode 100644 index 7e4ae41355..0000000000 --- a/MdeModulePkg/Include/Protocol/SimpleTextInExNotify.h +++ /dev/null @@ -1,25 +0,0 @@ -/** @file - This file defines Simple TextInEx Notify Guid that specify the notify handle. - -Copyright (c) 2008, Intel Corporation.
-All rights reserved. This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - -**/ - -#ifndef _SIMPLE_TEXTIN_EX_NOTIFY__H_ -#define _SIMPLE_TEXTIN_EX_NOTIFY__H_ - -#define SIMPLE_TEXTIN_EX_NOTIFY_GUID \ - { \ - 0x856f2def, 0x4e93, 0x4d6b, {0x94, 0xce, 0x1c, 0xfe, 0x47, 0x1, 0x3e, 0xa5} \ - } - -extern EFI_GUID gSimpleTextInExNotifyGuid; - -#endif diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index ee2c86d128..2e40bd7407 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -217,9 +217,6 @@ ## Include/Protocol/TcgPlatform.h gEfiTcgPlatformProtocolGuid = { 0x8c4c9a41, 0xbf56, 0x4627, { 0x9e, 0xa, 0xc8, 0x38, 0x6d, 0x66, 0x11, 0x5c }} - ## Protocol Guid specify the Simple TextIn Notify handle. - ## Include/Protocol/SimpleTextInExNotify.h - gSimpleTextInExNotifyGuid = { 0x856f2def, 0x4e93, 0x4d6b, { 0x94, 0xce, 0x1c, 0xfe, 0x47, 0x01, 0x3e, 0xa5 }} ## Protocol Guid specify the device is the hot plug device. gEfiHotPlugDeviceGuid = { 0x220AC432, 0x1D43, 0x49E5, { 0xA7, 0x4F, 0x4C, 0x9D, 0xA6, 0x7A, 0xD2, 0x3B }} 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] diff --git a/Nt32Pkg/WinNtGopDxe/WinNtGop.h b/Nt32Pkg/WinNtGopDxe/WinNtGop.h index e83f9ad86a..a13b48c88e 100644 --- a/Nt32Pkg/WinNtGopDxe/WinNtGop.h +++ b/Nt32Pkg/WinNtGopDxe/WinNtGop.h @@ -34,7 +34,6 @@ Abstract: #include #include #include -#include #include #include diff --git a/Nt32Pkg/WinNtGopDxe/WinNtGopDxe.inf b/Nt32Pkg/WinNtGopDxe/WinNtGopDxe.inf index 7f8c537b37..6581ad69ca 100644 --- a/Nt32Pkg/WinNtGopDxe/WinNtGopDxe.inf +++ b/Nt32Pkg/WinNtGopDxe/WinNtGopDxe.inf @@ -69,4 +69,3 @@ gEfiSimpleTextInProtocolGuid # PROTOCOL BY_START gEfiSimpleTextInputExProtocolGuid # PROTOCOL BY_START gEfiWinNtIoProtocolGuid # PROTOCOL TO_START - gSimpleTextInExNotifyGuid # PROTOCOL ALWAYS_CONSUMED diff --git a/Nt32Pkg/WinNtGopDxe/WinNtGopInput.c b/Nt32Pkg/WinNtGopDxe/WinNtGopInput.c index ff768cb998..be41a8e854 100644 --- a/Nt32Pkg/WinNtGopDxe/WinNtGopInput.c +++ b/Nt32Pkg/WinNtGopDxe/WinNtGopInput.c @@ -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; } -- 2.39.2