diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2023-04-20 16:16:34 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2023-04-20 16:16:34 -0500 |
commit | 1c03b5bfc59ec1c36c68c0a26c69dee81369e8fa (patch) | |
tree | fabdbf1b488d4913c4a402ba9eaf44ec6470ca2d /arch/alpha/kernel/pci.c | |
parent | 43ca31e00254fe2ee0712afdad2a6681e2eb34ae (diff) | |
parent | e34a6ba53e80d7f6c6eb61d0438842d9ba63504a (diff) | |
download | linux-stable-1c03b5bfc59ec1c36c68c0a26c69dee81369e8fa.tar.gz |
Merge branch 'pci/resource'
- Add pci_dev_for_each_resource() and pci_bus_for_each_resource() iterators
to simplify loops (Andy Shevchenko)
* pci/resource:
EISA: Drop unused pci_bus_for_each_resource() index argument
PCI: Make pci_bus_for_each_resource() index optional
PCI: Document pci_bus_for_each_resource()
PCI: Introduce pci_dev_for_each_resource()
PCI: Introduce pci_resource_n()
Diffstat (limited to 'arch/alpha/kernel/pci.c')
-rw-r--r-- | arch/alpha/kernel/pci.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c index 64fbfb0763b2..4458eb7f44f0 100644 --- a/arch/alpha/kernel/pci.c +++ b/arch/alpha/kernel/pci.c @@ -288,11 +288,10 @@ pcibios_claim_one_bus(struct pci_bus *b) struct pci_bus *child_bus; list_for_each_entry(dev, &b->devices, bus_list) { + struct resource *r; int i; - for (i = 0; i < PCI_NUM_RESOURCES; i++) { - struct resource *r = &dev->resource[i]; - + pci_dev_for_each_resource(dev, r, i) { if (r->parent || !r->start || !r->flags) continue; if (pci_has_flag(PCI_PROBE_ONLY) || |