aboutsummaryrefslogtreecommitdiff
path: root/src/fw
diff options
context:
space:
mode:
authorAleksandr Bezzubikov <zuban32s@gmail.com>2017-08-18 02:33:19 +0300
committerKevin O'Connor <kevin@koconnor.net>2017-09-14 15:49:13 -0400
commit7de1f65c0cf1e11ee3fa580d59eb7acdd0c42ad9 (patch)
tree47455d58ac17d7692264e84ad1816c6194ab3b3d /src/fw
parent1ef72ab2f89ae61dcdb3f01323bd0a7dc978c2b9 (diff)
downloadseabios-hppa-7de1f65c0cf1e11ee3fa580d59eb7acdd0c42ad9.zip
seabios-hppa-7de1f65c0cf1e11ee3fa580d59eb7acdd0c42ad9.tar.gz
seabios-hppa-7de1f65c0cf1e11ee3fa580d59eb7acdd0c42ad9.tar.bz2
pci: refactor pci_find_capapibilty to get bdf as the first argument instead of the whole pci_device
Refactor pci_find_capability function to get bdf instead of a whole pci_device* as the only necessary field for this function is still bdf. Signed-off-by: Aleksandr Bezzubikov <zuban32s@gmail.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Diffstat (limited to 'src/fw')
-rw-r--r--src/fw/pciinit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c
index 08221e6..864954f 100644
--- a/src/fw/pciinit.c
+++ b/src/fw/pciinit.c
@@ -762,7 +762,7 @@ static int pci_bus_hotplug_support(struct pci_bus *bus, u8 pcie_cap)
return downstream_port && slot_implemented;
}
- shpc_cap = pci_find_capability(bus->bus_dev, PCI_CAP_ID_SHPC, 0);
+ shpc_cap = pci_find_capability(bus->bus_dev->bdf, PCI_CAP_ID_SHPC, 0);
return !!shpc_cap;
}
@@ -844,7 +844,7 @@ static int pci_bios_check_devices(struct pci_bus *busses)
*/
parent = &busses[0];
int type;
- u8 pcie_cap = pci_find_capability(s->bus_dev, PCI_CAP_ID_EXP, 0);
+ u8 pcie_cap = pci_find_capability(s->bus_dev->bdf, PCI_CAP_ID_EXP, 0);
int hotplug_support = pci_bus_hotplug_support(s, pcie_cap);
for (type = 0; type < PCI_REGION_TYPE_COUNT; type++) {
u64 align = (type == PCI_REGION_TYPE_IO) ?