summaryrefslogtreecommitdiff
path: root/src/northbridge/intel/x4x
diff options
context:
space:
mode:
authorFabio Aiuto <fabioaiuto83@gmail.com>2022-09-30 14:55:53 +0200
committerMartin Roth <martin.roth@amd.corp-partner.google.com>2022-10-06 18:35:03 +0000
commit61ed4ef5d50137886449086f7bf2052468f99f29 (patch)
tree0fc7c9a566e32754c8a614ffe10fa19669dd58c6 /src/northbridge/intel/x4x
parentd835da91552bc74892dce7b9d2aafb74ce86b1f2 (diff)
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 <fabioaiuto83@gmail.com> Change-Id: I4a3e96381c29056de71953ea2c39cd540f3df191 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68103 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/northbridge/intel/x4x')
-rw-r--r--src/northbridge/intel/x4x/northbridge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/northbridge/intel/x4x/northbridge.c b/src/northbridge/intel/x4x/northbridge.c
index cdf43c95e6..ac276b69d4 100644
--- a/src/northbridge/intel/x4x/northbridge.c
+++ b/src/northbridge/intel/x4x/northbridge.c
@@ -123,7 +123,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) {