@@ -25,16 +25,16 @@ using namespace villas::kernel::pci;
2525
2626#define PCI_BASE_ADDRESS_N (n ) (PCI_BASE_ADDRESS_0 + sizeof (uint32_t ) * (n))
2727
28- DeviceList *DeviceList ::instance = nullptr ;
28+ PciDeviceList *PciDeviceList ::instance = nullptr ;
2929
30- DeviceList * DeviceList ::getInstance () {
30+ PciDeviceList * PciDeviceList ::getInstance () {
3131 if (instance == nullptr ) {
32- instance = new DeviceList ();
32+ instance = new PciDeviceList ();
3333 }
3434 return instance;
3535};
3636
37- DeviceList::DeviceList () {
37+ PciDeviceList::PciDeviceList () {
3838 struct dirent *e;
3939 DIR *dp;
4040 FILE *f;
@@ -88,21 +88,22 @@ DeviceList::DeviceList() {
8888 closedir (dp);
8989}
9090
91- DeviceList ::value_type DeviceList ::lookupDevice (const Slot &s) {
92- return *std::find_if (begin (), end (), [s](const DeviceList ::value_type &d) {
91+ PciDeviceList ::value_type PciDeviceList ::lookupDevice (const Slot &s) {
92+ return *std::find_if (begin (), end (), [s](const PciDeviceList ::value_type &d) {
9393 return d->slot == s;
9494 });
9595}
9696
97- DeviceList ::value_type DeviceList ::lookupDevice (const Id &i) {
98- return *std::find_if (begin (), end (), [i](const DeviceList ::value_type &d) {
97+ PciDeviceList ::value_type PciDeviceList ::lookupDevice (const Id &i) {
98+ return *std::find_if (begin (), end (), [i](const PciDeviceList ::value_type &d) {
9999 return d->id == i;
100100 });
101101}
102102
103- DeviceList::value_type DeviceList::lookupDevice (const PciDevice &d) {
104- auto dev = std::find_if (
105- begin (), end (), [d](const DeviceList::value_type &e) { return *e == d; });
103+ PciDeviceList::value_type PciDeviceList::lookupDevice (const PciDevice &d) {
104+ auto dev =
105+ std::find_if (begin (), end (),
106+ [d](const PciDeviceList::value_type &e) { return *e == d; });
106107
107108 return dev == end () ? value_type () : *dev;
108109}
0 commit comments