summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Usb
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-25 05:35:12 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2009-02-25 05:35:12 +0000
commit7fc80d44841dbc1f1b68d75312ab7ec9e6d63613 (patch)
tree1237b73bb1563ca24435c17931eee8faf69b9807 /MdeModulePkg/Bus/Usb
parent1088908eb245fddf4de846139322fee89ccdb1f0 (diff)
downloadedk2-7fc80d44841dbc1f1b68d75312ab7ec9e6d63613.zip
edk2-7fc80d44841dbc1f1b68d75312ab7ec9e6d63613.tar.gz
edk2-7fc80d44841dbc1f1b68d75312ab7ec9e6d63613.tar.bz2
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
Diffstat (limited to 'MdeModulePkg/Bus/Usb')
-rw-r--r--MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c38
-rw-r--r--MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.h1
-rw-r--r--MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf4
3 files changed, 3 insertions, 40 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c
index 07fec7c..c78305e 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;
@@ -1117,21 +1106,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.
//
NotifyList = &UsbKeyboardDevice->NotifyList;
@@ -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 73191e6..ec24045 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 <Protocol/HiiDatabase.h>
#include <Protocol/UsbIo.h>
#include <Protocol/DevicePath.h>
-#include <Protocol/SimpleTextInExNotify.h>
#include <Guid/HiiKeyBoardLayout.h>
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf b/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
index b2953fb..f5701a8 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.)