]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/WinNtGopDxe/WinNtGopInput.c
fix build breaks. and allow for new lists to be created.
[mirror_edk2.git] / Nt32Pkg / WinNtGopDxe / WinNtGopInput.c
index acf838b6308d904bcd0f2e083a13fcab87f2a472..ccf75f5fcee489300866d2f213c9670590d3ba08 100644 (file)
@@ -719,7 +719,6 @@ WinNtGopSimpleTextInExRegisterKeyNotify (
                               \r
 --*/   \r
 {\r
-  EFI_STATUS                         Status;\r
   GOP_PRIVATE_DATA                   *Private;\r
   WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY *CurrentNotify;\r
   LIST_ENTRY                         *Link;\r
@@ -759,20 +758,10 @@ WinNtGopSimpleTextInExRegisterKeyNotify (
 \r
   NewNotify->Signature         = WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE;     \r
   NewNotify->KeyNotificationFn = KeyNotificationFunction;\r
+  NewNotify->NotifyHandle      = (EFI_HANDLE) NewNotify;\r
   CopyMem (&NewNotify->KeyData, KeyData, sizeof (KeyData));\r
   InsertTailList (&Private->NotifyList, &NewNotify->NotifyEntry);\r
 \r
-  //\r
-  // Use gSimpleTextInExNotifyGuid to get a valid EFI_HANDLE\r
-  //  \r
-  Status = gBS->InstallMultipleProtocolInterfaces (\r
-                  &NewNotify->NotifyHandle,\r
-                  &gSimpleTextInExNotifyGuid,\r
-                  NULL,\r
-                  NULL\r
-                  );\r
-  ASSERT_EFI_ERROR (Status);\r
-  \r
   *NotifyHandle = NewNotify->NotifyHandle;  \r
   \r
   return EFI_SUCCESS;\r
@@ -797,11 +786,9 @@ WinNtGopSimpleTextInExUnregisterKeyNotify (
   Returns:\r
     EFI_SUCCESS             - The notification function was unregistered successfully.\r
     EFI_INVALID_PARAMETER   - The NotificationHandle is invalid.\r
-    EFI_NOT_FOUND           - Can not find the matching entry in database.  \r
                               \r
 --*/   \r
 {\r
-  EFI_STATUS                         Status;\r
   GOP_PRIVATE_DATA                   *Private;\r
   LIST_ENTRY                         *Link;\r
   WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY *CurrentNotify;\r
@@ -809,18 +796,10 @@ WinNtGopSimpleTextInExUnregisterKeyNotify (
   if (NotificationHandle == NULL) {\r
     return EFI_INVALID_PARAMETER;\r
   } \r
-  \r
-  Status = gBS->OpenProtocol (\r
-                  NotificationHandle,\r
-                  &gSimpleTextInExNotifyGuid,\r
-                  NULL,\r
-                  NULL,\r
-                  NULL,\r
-                  EFI_OPEN_PROTOCOL_TEST_PROTOCOL\r
-                  );\r
-  if (EFI_ERROR (Status)) {\r
+\r
+  if (((WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY *) NotificationHandle)->Signature != WIN_NT_GOP_SIMPLE_TEXTIN_EX_NOTIFY_SIGNATURE) {\r
     return EFI_INVALID_PARAMETER;\r
-  }\r
+  } \r
 \r
   Private = GOP_PRIVATE_DATA_FROM_TEXT_IN_EX_THIS (This);\r
 \r
@@ -836,13 +815,7 @@ WinNtGopSimpleTextInExUnregisterKeyNotify (
       // Remove the notification function from NotifyList and free resources\r
       //\r
       RemoveEntryList (&CurrentNotify->NotifyEntry);      \r
-      Status = gBS->UninstallMultipleProtocolInterfaces (\r
-                      CurrentNotify->NotifyHandle,\r
-                      &gSimpleTextInExNotifyGuid,\r
-                      NULL,\r
-                      NULL\r
-                      );\r
-      ASSERT_EFI_ERROR (Status);\r
+\r
       gBS->FreePool (CurrentNotify);            \r
       return EFI_SUCCESS;\r
     }\r
@@ -851,7 +824,7 @@ WinNtGopSimpleTextInExUnregisterKeyNotify (
   //\r
   // Can not find the specified Notification Handle\r
   //\r
-  return EFI_NOT_FOUND;\r
+  return EFI_INVALID_PARAMETER;\r
 }\r
 \r
 /**\r