device/oprom: Replace uses of dev_find_slot()

The call to dev_find_slot() may return PCI devices that
are disabled or unaccessible, as PCI enumeration does
not remove nodes from all_devices linked list.

Use PCI topology search instead.

Change-Id: I00233177e5572ca79002a7d141cda1b94b966330
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34083
Reviewed-by: Mike Banon <mikebdp2@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/device/oprom/realmode/x86_interrupts.c b/src/device/oprom/realmode/x86_interrupts.c
index 2629ab9..8e3a51e 100644
--- a/src/device/oprom/realmode/x86_interrupts.c
+++ b/src/device/oprom/realmode/x86_interrupts.c
@@ -174,7 +174,7 @@
 		devfn = X86_EBX & 0xff;
 		bus = X86_EBX >> 8;
 		reg = X86_EDI;
-		dev = dev_find_slot(bus, devfn);
+		dev = pcidev_path_on_bus(bus, devfn);
 		if (!dev) {
 			printk(BIOS_DEBUG, "0x%x: BAD DEVICE bus %d devfn 0x%x\n", func, bus, devfn);
 			// Or are we supposed to return PCIBIOS_NODEV?