bugfix: tools: use pci member
Tool worked by declaring its own pci utility object instead of using the
one provided. There are not yet unit-tests associated with the
P2aDataHandler that would have caught this.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I62cdeb17d298f1db51d8f513c59bfd299fc2884a
diff --git a/tools/p2a.cpp b/tools/p2a.cpp
index dd05ccd..2a48285 100644
--- a/tools/p2a.cpp
+++ b/tools/p2a.cpp
@@ -30,7 +30,6 @@
std::uint16_t session)
{
PciDevice result;
- PciUtilImpl pci;
PciFilter filter;
bool found = false;
pciaddr_t bar1;
@@ -39,7 +38,7 @@
filter.did = aspeedDeviceId;
/* Find the ASPEED PCI device entry we want. */
- auto output = pci.getPciDevices(filter);
+ auto output = pci->getPciDevices(filter);
for (const auto& d : output)
{
std::fprintf(stderr, "[0x%x 0x%x] ", d.vid, d.did);