summaryrefslogtreecommitdiff
path: root/drivers/pci/setup-irq.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2012-09-17 15:22:54 +0400
committerBjorn Helgaas <bhelgaas@google.com>2012-09-19 03:28:21 +0400
commit8885b7b637fa9aca7e1b00581a0173c6956966d3 (patch)
tree68511ba698f6837498a9ed0a18d312039cb89e5f /drivers/pci/setup-irq.c
parent3ddbebf878ac8d958bb34e87a742a6b3adc283a3 (diff)
downloadlinux-8885b7b637fa9aca7e1b00581a0173c6956966d3.tar.xz
PCI: Provide a default pcibios_update_irq()
Most architectures implement this in exactly the same way. Instead of having each architecture duplicate this function, provide a single implementation in the core and make it a weak symbol so that it can be overridden on architectures where it is required. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/setup-irq.c')
-rw-r--r--drivers/pci/setup-irq.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pci/setup-irq.c b/drivers/pci/setup-irq.c
index 270ae7b97120..9bd6864ec5d3 100644
--- a/drivers/pci/setup-irq.c
+++ b/drivers/pci/setup-irq.c
@@ -17,6 +17,11 @@
#include <linux/ioport.h>
#include <linux/cache.h>
+void __weak pcibios_update_irq(struct pci_dev *dev, int irq)
+{
+ dev_dbg(&dev->dev, "assigning IRQ %02d\n", irq);
+ pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);
+}
static void
pdev_fixup_irq(struct pci_dev *dev,