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>
This commit is contained in:
parent
d835da9155
commit
61ed4ef5d5
|
@ -219,7 +219,7 @@ static const char *qemu_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;
|
||||
|
||||
return NULL;
|
||||
|
|
|
@ -159,7 +159,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) {
|
||||
|
|
|
@ -23,7 +23,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) {
|
||||
|
|
|
@ -101,7 +101,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) {
|
||||
|
|
|
@ -63,7 +63,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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue