diff options
author | Matthew Garrett <mjg@redhat.com> | 2012-12-05 14:33:27 -0700 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-12-05 14:38:26 -0700 |
commit | eca0d4676d8e29c209ddce0c0c1755472ffc70a6 (patch) | |
tree | 0455ac26c96f0a383665fe353d28dbeaa3e1f14b /drivers/pci/pci.c | |
parent | dd5fc854de5fd37adfcef8a366cd21a55aa01d3d (diff) |
PCI: Add pcibios_add_device
Platforms may want to provide architecture-specific functionality during
PCI enumeration. Add a pcibios_add_device() call that architectures can
override to do so.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Seth Forshee <seth.forshee@canonical.com>
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r-- | drivers/pci/pci.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 54858838f098..fa0ddd51a216 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -1333,6 +1333,19 @@ void pcim_pin_device(struct pci_dev *pdev) dr->pinned = 1; } +/* + * pcibios_add_device - provide arch specific hooks when adding device dev + * @dev: the PCI device being added + * + * Permits the platform to provide architecture specific functionality when + * devices are added. This is the default implementation. Architecture + * implementations can override this. + */ +int __weak pcibios_add_device (struct pci_dev *dev) +{ + return 0; +} + /** * pcibios_disable_device - disable arch specific PCI resources for device dev * @dev: the PCI device to disable |