diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2013-06-05 16:05:32 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-06-26 21:10:05 +0200 |
commit | 44b9ca47534d478bf9954d380515cb282fcb48a2 (patch) | |
tree | 0cb77c90e552c6f7a77d06e5c8872ac013392ddb /drivers/pci | |
parent | 24d5dd0208ed1cd3ef6bf30a50b347ef366f21ac (diff) |
pci: add pcibios_release_device
Platforms may want to provide architecture-specific functionality when
a pci device is released. Add a pcibios_release_device() call that
architectures can override to do so.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci.c | 10 | ||||
-rw-r--r-- | drivers/pci/probe.c | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index a899d8bb190..95057a925d8 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1335,6 +1335,16 @@ int __weak pcibios_add_device (struct pci_dev *dev) } /** + * pcibios_release_device - provide arch specific hooks when releasing device dev + * @dev: the PCI device being released + * + * Permits the platform to provide architecture specific functionality when + * devices are released. This is the default implementation. Architecture + * implementations can override this. + */ +void __weak pcibios_release_device(struct pci_dev *dev) {} + +/** * pcibios_disable_device - disable arch specific PCI resources for device dev * @dev: the PCI device to disable * diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 70f10fa3c1b..58cc0a8a097 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1132,6 +1132,7 @@ static void pci_release_dev(struct device *dev) pci_dev = to_pci_dev(dev); pci_release_capabilities(pci_dev); pci_release_of_node(pci_dev); + pcibios_release_device(pci_dev); kfree(pci_dev); } |