summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2013-07-26 03:14:08 +0000
committerniruiyu <niruiyu@6f19259b-4bc3-4df7-8a09-765794883524>2013-07-26 03:14:08 +0000
commit863986b3c8e67736d361b68e293d01e6f92f825c (patch)
tree15cf067d949655c9defeeeaa78eeea6050845b64 /MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
parent4d0a30a494599226450bf69ad9d6fc689f61712e (diff)
Update all the code to consume the ConvertDevicePathToText, ConvertDevicePathNodeToText, ConvertTextToDevicePath and ConvertTextToDeviceNode APIs in DevicePathLib.
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> Reviewed-by: Elvin Li <elvin.li@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14505 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c')
-rw-r--r--MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
index a5cea9e52a..b3d91a8d30 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
@@ -290,7 +290,6 @@ DumpResourceMap (
PCI_RESOURCE_NODE *ChildPMem32Node;
PCI_RESOURCE_NODE *ChildMem64Node;
PCI_RESOURCE_NODE *ChildPMem64Node;
- EFI_DEVICE_PATH_TO_TEXT_PROTOCOL *ToText;
CHAR16 *Str;
DEBUG ((EFI_D_INFO, "PciBus: Resource Map for "));
@@ -309,19 +308,11 @@ DumpResourceMap (
Bridge->BusNumber, Bridge->DeviceNumber, Bridge->FunctionNumber
));
} else {
- Status = gBS->LocateProtocol (
- &gEfiDevicePathToTextProtocolGuid,
- NULL,
- (VOID **) &ToText
- );
- Str = NULL;
- if (!EFI_ERROR (Status)) {
- Str = ToText->ConvertDevicePathToText (
- DevicePathFromHandle (Bridge->Handle),
- FALSE,
- FALSE
- );
- }
+ Str = ConvertDevicePathToText (
+ DevicePathFromHandle (Bridge->Handle),
+ FALSE,
+ FALSE
+ );
DEBUG ((EFI_D_INFO, "Root Bridge %s\n", Str != NULL ? Str : L""));
if (Str != NULL) {
FreePool (Str);