diff options
author | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-07-30 03:50:42 +0000 |
---|---|---|
committer | niruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-07-30 03:50:42 +0000 |
commit | 402e4a9d777677296945afa020194bf4123885e2 (patch) | |
tree | 9bc0e66d4413d25b7f816a2e87d96fe06a063a93 /UnixPkg | |
parent | 6b8ebcb8de52ae5cab543181712e53eeb94340a7 (diff) | |
download | edk2-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 'UnixPkg')
-rw-r--r-- | UnixPkg/UnixGopDxe/UnixGop.h | 3 | ||||
-rw-r--r-- | UnixPkg/UnixGopDxe/UnixGopInput.c | 13 |
2 files changed, 7 insertions, 9 deletions
diff --git a/UnixPkg/UnixGopDxe/UnixGop.h b/UnixPkg/UnixGopDxe/UnixGop.h index 7d96e3fd18..bd29b69538 100644 --- a/UnixPkg/UnixGopDxe/UnixGop.h +++ b/UnixPkg/UnixGopDxe/UnixGop.h @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR> +Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> Portions copyright (c) 2010, Apple, Inc. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -55,7 +55,6 @@ typedef struct { #define UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE SIGNATURE_32 ('U', 'g', 'S', 'n') typedef struct _UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY { UINTN Signature; - EFI_HANDLE NotifyHandle; EFI_KEY_DATA KeyData; EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn; EFI_EVENT Event; diff --git a/UnixPkg/UnixGopDxe/UnixGopInput.c b/UnixPkg/UnixGopDxe/UnixGopInput.c index 4015be2376..89087d0160 100644 --- a/UnixPkg/UnixGopDxe/UnixGopInput.c +++ b/UnixPkg/UnixGopDxe/UnixGopInput.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR> +Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR> Portions copyright (c) 2010, Apple, Inc. All rights reserved.<BR> Portions copyright (c) 2010, Apple Inc. All rights reserved.<BR> This program and the accompanying materials @@ -499,7 +499,7 @@ UnixGopSimpleTextInExRegisterKeyNotify ( 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; @@ -526,7 +526,7 @@ UnixGopSimpleTextInExRegisterKeyNotify ( ); if (GopPrivateIsKeyRegistered (&CurrentNotify->KeyData, KeyData)) { if (CurrentNotify->KeyNotificationFn == KeyNotificationFunction) { - *NotifyHandle = CurrentNotify->NotifyHandle; + *NotifyHandle = CurrentNotify; return EFI_SUCCESS; } } @@ -542,7 +542,6 @@ UnixGopSimpleTextInExRegisterKeyNotify ( NewNotify->Signature = UNIX_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); @@ -556,7 +555,7 @@ UnixGopSimpleTextInExRegisterKeyNotify ( ASSERT_EFI_ERROR (Status); - *NotifyHandle = NewNotify->NotifyHandle; + *NotifyHandle = NewNotify; return EFI_SUCCESS; @@ -582,7 +581,7 @@ EFI_STATUS EFIAPI UnixGopSimpleTextInExUnregisterKeyNotify ( IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This, - IN EFI_HANDLE NotificationHandle + IN VOID *NotificationHandle ) /*++ @@ -620,7 +619,7 @@ UnixGopSimpleTextInExUnregisterKeyNotify ( NotifyEntry, UNIX_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE ); - if (CurrentNotify->NotifyHandle == NotificationHandle) { + if (CurrentNotify == NotificationHandle) { // // Remove the notification function from NotifyList and free resources // |