summaryrefslogtreecommitdiff
path: root/ShellPkg/Library/UefiSortLib/UefiSortLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library/UefiSortLib/UefiSortLib.c')
-rw-r--r--ShellPkg/Library/UefiSortLib/UefiSortLib.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/ShellPkg/Library/UefiSortLib/UefiSortLib.c b/ShellPkg/Library/UefiSortLib/UefiSortLib.c
index 9cff46d4e..2aab9d269 100644
--- a/ShellPkg/Library/UefiSortLib/UefiSortLib.c
+++ b/ShellPkg/Library/UefiSortLib/UefiSortLib.c
@@ -17,7 +17,6 @@
#include <Protocol/UnicodeCollation.h>
#include <Protocol/DevicePath.h>
-#include <Protocol/DevicePathToText.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/BaseLib.h>
@@ -25,8 +24,8 @@
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/SortLib.h>
+#include <Library/DevicePathLib.h>
-STATIC EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *mDevicePathToText = NULL;
STATIC EFI_UNICODE_COLLATION_PROTOCOL *mUnicodeCollation = NULL;
@@ -224,15 +223,6 @@ DevicePathCompare (
return 1;
}
- if (mDevicePathToText == NULL) {
- Status = gBS->LocateProtocol(
- &gEfiDevicePathToTextProtocolGuid,
- NULL,
- (VOID**)&mDevicePathToText);
-
- ASSERT_EFI_ERROR(Status);
- }
-
if (mUnicodeCollation == NULL) {
Status = gBS->LocateProtocol(
&gEfiUnicodeCollation2ProtocolGuid,
@@ -242,12 +232,12 @@ DevicePathCompare (
ASSERT_EFI_ERROR(Status);
}
- TextPath1 = mDevicePathToText->ConvertDevicePathToText(
+ TextPath1 = ConvertDevicePathToText(
DevicePath1,
FALSE,
FALSE);
- TextPath2 = mDevicePathToText->ConvertDevicePathToText(
+ TextPath2 = ConvertDevicePathToText(
DevicePath2,
FALSE,
FALSE);