summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg
diff options
context:
space:
mode:
authorniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2012-07-30 03:50:42 +0000
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2012-07-30 03:50:42 +0000
commit402e4a9d777677296945afa020194bf4123885e2 (patch)
tree9bc0e66d4413d25b7f816a2e87d96fe06a063a93 /IntelFrameworkModulePkg
parent6b8ebcb8de52ae5cab543181712e53eeb94340a7 (diff)
downloadedk2-platforms-402e4a9d777677296945afa020194bf4123885e2.tar.xz
Change the type of NotifyHandle from EFI_HANDLE to VOID * for SimpleTextInEx protocol.
Clean up the code to remove unnecessary NotifyHandle in the private data structure. Signed-off-by: Ruiyu Ni<ruiyu.ni@intel.com> Reviewed-by: Elvin Li<elvin.li@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13565 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg')
-rw-r--r--IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c11
-rw-r--r--IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h7
-rw-r--r--IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c15
-rw-r--r--IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.h7
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.h2
5 files changed, 19 insertions, 23 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c
index 201ef0ac5c..0efeb39e0d 100644
--- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c
+++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c
@@ -549,7 +549,7 @@ KeyboardRegisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
- OUT EFI_HANDLE *NotifyHandle
+ OUT VOID **NotifyHandle
)
{
EFI_STATUS Status;
@@ -582,7 +582,7 @@ KeyboardRegisterKeyNotify (
);
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
- *NotifyHandle = CurrentNotify->NotifyHandle;
+ *NotifyHandle = CurrentNotify;
Status = EFI_SUCCESS;
goto Exit;
}
@@ -600,11 +600,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);
- *NotifyHandle = NewNotify->NotifyHandle;
+ *NotifyHandle = NewNotify;
Status = EFI_SUCCESS;
Exit:
@@ -631,7 +630,7 @@ EFI_STATUS
EFIAPI
KeyboardUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
- IN EFI_HANDLE NotificationHandle
+ IN VOID *NotificationHandle
)
{
EFI_STATUS Status;
@@ -658,7 +657,7 @@ KeyboardUnregisterKeyNotify (
NotifyEntry,
KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE
);
- if (CurrentNotify->NotifyHandle == NotificationHandle) {
+ if (CurrentNotify == NotificationHandle) {
//
// Remove the notification function from NotifyList and free resources
//
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h
index 704c03618e..2023905538 100644
--- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h
+++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h
@@ -1,7 +1,7 @@
/** @file
PS/2 keyboard driver header file
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
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
@@ -50,7 +50,6 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gPs2KeyboardComponentName2;
typedef struct _KEYBOARD_CONSOLE_IN_EX_NOTIFY {
UINTN Signature;
- EFI_HANDLE NotifyHandle;
EFI_KEY_DATA KeyData;
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
LIST_ENTRY NotifyEntry;
@@ -496,7 +495,7 @@ KeyboardRegisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
- OUT EFI_HANDLE *NotifyHandle
+ OUT VOID **NotifyHandle
);
/**
@@ -515,7 +514,7 @@ EFI_STATUS
EFIAPI
KeyboardUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
- IN EFI_HANDLE NotificationHandle
+ IN VOID *NotificationHandle
);
/**
diff --git a/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c b/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c
index 179be5638e..3f0f9b699b 100644
--- a/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c
+++ b/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.c
@@ -1,7 +1,7 @@
/** @file
ConsoleOut Routines that speak VGA.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
@@ -2244,7 +2244,7 @@ BiosKeyboardRegisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
- OUT EFI_HANDLE *NotifyHandle
+ OUT VOID **NotifyHandle
)
{
EFI_STATUS Status;
@@ -2277,7 +2277,7 @@ BiosKeyboardRegisterKeyNotify (
);
if (IsKeyRegistered (&CurrentNotify->KeyData, KeyData)) {
if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) {
- *NotifyHandle = CurrentNotify->NotifyHandle;
+ *NotifyHandle = CurrentNotify;
Status = EFI_SUCCESS;
goto Exit;
}
@@ -2296,11 +2296,10 @@ BiosKeyboardRegisterKeyNotify (
NewNotify->Signature = BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE;
NewNotify->KeyNotificationFn = KeyNotificationFunction;
- NewNotify->NotifyHandle = (EFI_HANDLE) NewNotify;
CopyMem (&NewNotify->KeyData, KeyData, sizeof (EFI_KEY_DATA));
InsertTailList (&BiosKeyboardPrivate->NotifyList, &NewNotify->NotifyEntry);
- *NotifyHandle = NewNotify->NotifyHandle;
+ *NotifyHandle = NewNotify;
Status = EFI_SUCCESS;
Exit:
@@ -2325,7 +2324,7 @@ EFI_STATUS
EFIAPI
BiosKeyboardUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
- IN EFI_HANDLE NotificationHandle
+ IN VOID *NotificationHandle
)
{
EFI_STATUS Status;
@@ -2350,7 +2349,7 @@ BiosKeyboardUnregisterKeyNotify (
//
// Enter critical section
//
- OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
+ OldTpl = gBS->RaiseTPL (TPL_NOTIFY);
for (Link = BiosKeyboardPrivate->NotifyList.ForwardLink; Link != &BiosKeyboardPrivate->NotifyList; Link = Link->ForwardLink) {
CurrentNotify = CR (
@@ -2359,7 +2358,7 @@ BiosKeyboardUnregisterKeyNotify (
NotifyEntry,
BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY_SIGNATURE
);
- if (CurrentNotify->NotifyHandle == NotificationHandle) {
+ if (CurrentNotify == NotificationHandle) {
//
// Remove the notification function from NotifyList and free resources
//
diff --git a/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.h b/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.h
index 8c40d11ef8..a27d2e1b23 100644
--- a/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.h
+++ b/IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/BiosKeyboard.h
@@ -1,6 +1,6 @@
/** @file
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
@@ -195,7 +195,6 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gBiosKeyboardComponentName2;
typedef struct _BIOS_KEYBOARD_CONSOLE_IN_EX_NOTIFY {
UINTN Signature;
- EFI_HANDLE NotifyHandle;
EFI_KEY_DATA KeyData;
EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;
LIST_ENTRY NotifyEntry;
@@ -638,7 +637,7 @@ BiosKeyboardRegisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_DATA *KeyData,
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
- OUT EFI_HANDLE *NotifyHandle
+ OUT VOID **NotifyHandle
);
/**
@@ -655,7 +654,7 @@ EFI_STATUS
EFIAPI
BiosKeyboardUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
- IN EFI_HANDLE NotificationHandle
+ IN VOID *NotificationHandle
);
/**
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.h b/IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.h
index 3b571b8e64..f2c964e0c5 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.h
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.h
@@ -31,7 +31,7 @@ typedef struct {
UINTN Signature;
LIST_ENTRY Link;
- EFI_HANDLE NotifyHandle;
+ VOID *NotifyHandle;
UINT16 BootOptionNumber;
UINT8 CodeCount;
UINT8 WaitingKey;