]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Hand/DriverSupport.c
Clean up DxeCore to remove duplicate memory allocation & device path utility services...
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Hand / DriverSupport.c
index 773165232fb8ed79559bc034f9b3e2581e4df341..9db124c9f3f672190342a4274af8d42e808aec67 100644 (file)
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <DxeMain.h>\r
+#include "DxeMain.h"\r
 \r
 \r
 //\r
@@ -72,7 +72,7 @@ CoreConnectController (
   //\r
   AlignedRemainingDevicePath = NULL;\r
   if (RemainingDevicePath != NULL) {\r
-    AlignedRemainingDevicePath = CoreDuplicateDevicePath (RemainingDevicePath);\r
+    AlignedRemainingDevicePath = DuplicateDevicePath (RemainingDevicePath);\r
   }\r
 \r
   //\r
@@ -137,7 +137,7 @@ CoreConnectController (
     //\r
     // Allocate a handle buffer for ControllerHandle's children\r
     //\r
-    ChildHandleBuffer = CoreAllocateBootServicesPool (ChildHandleCount * sizeof(EFI_HANDLE));\r
+    ChildHandleBuffer = AllocatePool (ChildHandleCount * sizeof(EFI_HANDLE));\r
 \r
     //\r
     // Fill in a handle buffer with ControllerHandle's children\r
@@ -376,7 +376,7 @@ CoreConnectSingleController (
   //\r
   // Allocate a duplicate array for the sorted Driver Binding Protocol Instances\r
   //\r
-  SortedDriverBindingProtocols = CoreAllocateBootServicesPool (sizeof (VOID *) * DriverBindingHandleCount);\r
+  SortedDriverBindingProtocols = AllocatePool (sizeof (VOID *) * DriverBindingHandleCount);\r
   if (SortedDriverBindingProtocols == NULL) {\r
     CoreFreePool (DriverBindingHandleBuffer);\r
     return EFI_OUT_OF_RESOURCES;\r
@@ -707,7 +707,7 @@ CoreDisconnectController (
       goto Done;\r
     }\r
 \r
-    DriverImageHandleBuffer = CoreAllocateBootServicesPool (sizeof (EFI_HANDLE) * DriverImageHandleCount);\r
+    DriverImageHandleBuffer = AllocatePool (sizeof (EFI_HANDLE) * DriverImageHandleCount);\r
     if (DriverImageHandleBuffer == NULL) {\r
       Status = EFI_OUT_OF_RESOURCES;\r
       goto Done;\r
@@ -789,7 +789,7 @@ CoreDisconnectController (
       ChildHandleValid = FALSE;\r
       ChildBuffer = NULL;\r
       if (ChildBufferCount != 0) {\r
-        ChildBuffer = CoreAllocateBootServicesPool (sizeof (EFI_HANDLE) * ChildBufferCount);\r
+        ChildBuffer = AllocatePool (sizeof (EFI_HANDLE) * ChildBufferCount);\r
         if (ChildBuffer == NULL) {\r
           Status = EFI_OUT_OF_RESOURCES;\r
           goto Done;\r