diff options
author | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2017-06-28 15:13:53 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-06-28 15:13:53 -0500 |
commit | 5c3f18cce08364ef68163228c0b42725d64cd353 (patch) | |
tree | 429a2f0838841c1bbaac4f7d028505d7a2428000 /include/linux/pci.h | |
parent | dff79b91b8f3279cbe60727368adff1f3a5ab16e (diff) | |
download | lwn-5c3f18cce08364ef68163228c0b42725d64cd353.tar.gz lwn-5c3f18cce08364ef68163228c0b42725d64cd353.zip |
PCI: Add devm_pci_alloc_host_bridge() interface
Struct pci_host_bridge can be allocated by PCI host bridge drivers which
usually allocate and map memory through devm managed interfaces.
Add a devm version for the pci_alloc_host_bridge() interface to simplify
PCI host controller driver porting and simplify the driver failure paths.
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 9095b38c2fa3..d39a66dc67aa 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -458,6 +458,8 @@ static inline struct pci_host_bridge *pci_host_bridge_from_priv(void *priv) } struct pci_host_bridge *pci_alloc_host_bridge(size_t priv); +struct pci_host_bridge *devm_pci_alloc_host_bridge(struct device *dev, + size_t priv); void pci_free_host_bridge(struct pci_host_bridge *bridge); int pci_register_host_bridge(struct pci_host_bridge *bridge); struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus); |