summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/devicetree.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@linaro.org>2013-09-19 16:44:55 -0500
committerGrant Likely <grant.likely@linaro.org>2013-10-24 11:50:36 +0100
commit16b84e5a505c790538e534ad8dfda9c288691e40 (patch)
tree887e4da0c9cdf408350230165cf72730cec599e6 /arch/x86/kernel/devicetree.c
parentf7578496a671a96e501f16a5104893275e32c33a (diff)
of/irq: Create of_irq_parse_and_map_pci() to consolidate arch code.
Several architectures open code effectively the same code block for finding and mapping PCI irqs. This patch consolidates it down to a single function. Signed-off-by: Grant Likely <grant.likely@linaro.org> Acked-by: Michal Simek <monstr@monstr.eu> Cc: Russell King <linux@arm.linux.org.uk> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/x86/kernel/devicetree.c')
-rw-r--r--arch/x86/kernel/devicetree.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index d39948f654a0..69c826a3d07e 100644
--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -105,7 +105,6 @@ struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus)
static int x86_of_pci_irq_enable(struct pci_dev *dev)
{
- struct of_phandle_args oirq;
u32 virq;
int ret;
u8 pin;
@@ -116,11 +115,7 @@ static int x86_of_pci_irq_enable(struct pci_dev *dev)
if (!pin)
return 0;
- ret = of_irq_parse_pci(dev, &oirq);
- if (ret)
- return ret;
-
- virq = irq_create_of_mapping(&oirq);
+ virq = of_irq_parse_and_map_pci(dev, 0, 0);
if (virq == 0)
return -EINVAL;
dev->irq = virq;