From 61ed4ef5d50137886449086f7bf2052468f99f29 Mon Sep 17 00:00:00 2001 From: Fabio Aiuto Date: Fri, 30 Sep 2022 14:55:53 +0200 Subject: treewide: use predicate to check if pci device is on n-th bus use function to check if pci device is on a particular bus number. TEST: compiled and qemu run successfully Signed-off-by: Fabio Aiuto Change-Id: I4a3e96381c29056de71953ea2c39cd540f3df191 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68103 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/northbridge/intel/pineview/northbridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/northbridge/intel/pineview/northbridge.c') diff --git a/src/northbridge/intel/pineview/northbridge.c b/src/northbridge/intel/pineview/northbridge.c index 3afdd3ba98..7e29db92b3 100644 --- a/src/northbridge/intel/pineview/northbridge.c +++ b/src/northbridge/intel/pineview/northbridge.c @@ -145,7 +145,7 @@ static const char *northbridge_acpi_name(const struct device *dev) if (dev->path.type == DEVICE_PATH_DOMAIN) return "PCI0"; - if (dev->path.type != DEVICE_PATH_PCI || dev->bus->secondary != 0) + if (!is_pci_dev_on_bus(dev, 0)) return NULL; switch (dev->path.pci.devfn) { -- cgit v1.2.3