diff options
author | erictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-11 02:47:10 +0000 |
---|---|---|
committer | erictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-11 02:47:10 +0000 |
commit | ea0210023728e57519584432ac5cb6c11869b93d (patch) | |
tree | 8902c4c20781781f9a8a956b72aad101d1f95a42 /MdeModulePkg | |
parent | 4140a6635b4784db9d0125e96d521d01053eca2c (diff) | |
download | edk2-ea0210023728e57519584432ac5cb6c11869b93d.zip edk2-ea0210023728e57519584432ac5cb6c11869b93d.tar.gz edk2-ea0210023728e57519584432ac5cb6c11869b93d.tar.bz2 |
1. free those inserted NsKeyNode resource when releasing SetKeyBoardLayout event.
2. cleanup HiiDataBaseDxe to directly use gEfiHiiKeyBoardLayoutGuid which is used as the guid of event group.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9978 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf | 7 | ||||
-rw-r--r-- | MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseEntry.c | 3 |
3 files changed, 8 insertions, 6 deletions
diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c index 0716830..eb9bbd9 100644 --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c @@ -395,11 +395,9 @@ ErrorExit: gBS->CloseEvent (UsbKeyboardDevice->SimpleInputEx.WaitForKeyEx);
}
if (UsbKeyboardDevice->KeyboardLayoutEvent != NULL) {
+ ReleaseKeyboardLayoutResources (UsbKeyboardDevice);
gBS->CloseEvent (UsbKeyboardDevice->KeyboardLayoutEvent);
}
- if (UsbKeyboardDevice->KeyConvertionTable != NULL) {
- FreePool (UsbKeyboardDevice->KeyConvertionTable);
- }
FreePool (UsbKeyboardDevice);
UsbKeyboardDevice = NULL;
}
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf index e213cc7..9b38c9c 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf @@ -72,7 +72,12 @@ [Guids]
gEfiGlobalVariableGuid ## SOMETIMES_CONSUMES ## Variable:"PlatformLang"
-
+ ##
+ # Event registered to EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID group,
+ # which will be triggered by EFI_HII_DATABASE_PROTOCOL.SetKeyboardLayout().
+ ##
+ gEfiHiiKeyBoardLayoutGuid ## SOMETIME_CONSUMES ## Event
+
[Depex]
TRUE
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseEntry.c b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseEntry.c index 85202b2..04801fc 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseEntry.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseEntry.c @@ -20,7 +20,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // Global variables
//
EFI_EVENT gHiiKeyboardLayoutChanged;
-EFI_GUID gHiiSetKbdLayoutEventGuid = EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID;
HII_DATABASE_PRIVATE_DATA mPrivate = {
HII_DATABASE_PRIVATE_DATA_SIGNATURE,
@@ -168,7 +167,7 @@ InitializeHiiDatabase ( TPL_NOTIFY,
KeyboardLayoutChangeNullEvent,
NULL,
- &gHiiSetKbdLayoutEventGuid,
+ &gEfiHiiKeyBoardLayoutGuid,
&gHiiKeyboardLayoutChanged
);
if (EFI_ERROR (Status)) {
|