diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-05-28 18:09:16 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-06-06 15:25:51 -0500 |
commit | 950334bcf17a6ab55ce13d3bdf050f7b429320d5 (patch) | |
tree | 2c218cbf95f3ef9c6b4015cd8bea17fb02491b15 /include/linux/pci.h | |
parent | 1a695a905c18548062509178b98bc91e67510864 (diff) |
PCI: Add devm_request_pci_bus_resources()
Several host bridge drivers iterate through the list of bridge windows to
request resources. Several others don't request the window resources at
all.
Add a devm_request_pci_bus_resources() interface to make it easier for
drivers to request all the window resources. Export to GPL modules (from
Arnd Bergmann <arnd@arndb.de>).
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index b67e4df20801..6ac83606cb0d 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1143,9 +1143,12 @@ void pci_add_resource(struct list_head *resources, struct resource *res); void pci_add_resource_offset(struct list_head *resources, struct resource *res, resource_size_t offset); void pci_free_resource_list(struct list_head *resources); -void pci_bus_add_resource(struct pci_bus *bus, struct resource *res, unsigned int flags); +void pci_bus_add_resource(struct pci_bus *bus, struct resource *res, + unsigned int flags); struct resource *pci_bus_resource_n(const struct pci_bus *bus, int n); void pci_bus_remove_resources(struct pci_bus *bus); +int devm_request_pci_bus_resources(struct device *dev, + struct list_head *resources); #define pci_bus_for_each_resource(bus, res, i) \ for (i = 0; \ |