aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2010-02-23 12:24:31 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-02-23 12:43:31 -0500
commit89a74ecccd1f78e51faf6287e5c0e93a92ac096e (patch)
tree6d167d73fb2cf5bb457b0b19145fcbf81cf441ef /include/linux/pci.h
parent2adf75160b10bf3f09ed7d3d04e937f923fc557e (diff)
PCI: add pci_bus_for_each_resource(), remove direct bus->resource[] refs
No functional change; this converts loops that iterate from 0 to PCI_BUS_NUM_RESOURCES through pci_bus resource[] table to use the pci_bus_for_each_resource() iterator instead. This doesn't change the way resources are stored; it merely removes dependencies on the fact that they're in a table. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 1a29f9f6b2dc..2ff9d26a078f 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -829,6 +829,9 @@ int pci_request_selected_regions_exclusive(struct pci_dev *, int, const char *);
829void pci_release_selected_regions(struct pci_dev *, int); 829void pci_release_selected_regions(struct pci_dev *, int);
830 830
831/* drivers/pci/bus.c */ 831/* drivers/pci/bus.c */
832#define pci_bus_for_each_resource(bus, res, i) \
833 for (i = 0; res = bus->resource[i], i < PCI_BUS_NUM_RESOURCES; i++)
834
832int __must_check pci_bus_alloc_resource(struct pci_bus *bus, 835int __must_check pci_bus_alloc_resource(struct pci_bus *bus,
833 struct resource *res, resource_size_t size, 836 struct resource *res, resource_size_t size,
834 resource_size_t align, resource_size_t min, 837 resource_size_t align, resource_size_t min,