diff options
author | Matthew Minter <matt@masarand.com> | 2017-06-28 15:14:04 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-07-02 16:14:28 -0500 |
commit | 30fdfb929e82450bbf3d0e0aba56efbc29b52b52 (patch) | |
tree | 1db6ba9a6beb492c4a3c1bd39793c121ee3414a2 /drivers/pci/pci-driver.c | |
parent | 716fb31148e9ce78f7c96c1f81a32f52140bcd98 (diff) | |
download | linux-30fdfb929e82450bbf3d0e0aba56efbc29b52b52.tar.gz linux-30fdfb929e82450bbf3d0e0aba56efbc29b52b52.tar.bz2 linux-30fdfb929e82450bbf3d0e0aba56efbc29b52b52.zip |
PCI: Add a call to pci_assign_irq() in pci_device_probe()
The pci_assign_irq() function allows assignment of an IRQ to devices during
device enable time rather than only at boot. Therefore call it in the
pci_device_probe() function during the enable device code path so this
assignment can be performed.
This patch will do nothing on arches which do not set the IRQ mapping
function pointers and is therefore currently a nop, however as support for
these function pointers is added to arch-specific code this will cause IRQ
assignment to migrate to device enable time allowing the new code paths to
be used.
Signed-off-by: Matthew Minter <matt@masarand.com>
[lorenzo.pieralisi@arm.com: moved pci_assign_irq() call site]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r-- | drivers/pci/pci-driver.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 192e7b681b96..11167c65ca37 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -412,6 +412,8 @@ static int pci_device_probe(struct device *dev) struct pci_dev *pci_dev = to_pci_dev(dev); struct pci_driver *drv = to_pci_driver(dev->driver); + pci_assign_irq(pci_dev); + error = pcibios_alloc_irq(pci_dev); if (error < 0) return error; |