diff options
author | Grant Likely <grant.likely@linaro.org> | 2013-09-19 16:44:55 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2013-10-24 11:50:36 +0100 |
commit | 16b84e5a505c790538e534ad8dfda9c288691e40 (patch) | |
tree | 887e4da0c9cdf408350230165cf72730cec599e6 /arch/mips/pci/pci-rt3883.c | |
parent | f7578496a671a96e501f16a5104893275e32c33a (diff) | |
download | blackbird-op-linux-16b84e5a505c790538e534ad8dfda9c288691e40.tar.gz blackbird-op-linux-16b84e5a505c790538e534ad8dfda9c288691e40.zip |
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/mips/pci/pci-rt3883.c')
-rw-r--r-- | arch/mips/pci/pci-rt3883.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/arch/mips/pci/pci-rt3883.c b/arch/mips/pci/pci-rt3883.c index eadc4310cd36..adeff2bfe4cd 100644 --- a/arch/mips/pci/pci-rt3883.c +++ b/arch/mips/pci/pci-rt3883.c @@ -583,27 +583,7 @@ err_put_intc_node: int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) { - struct of_phandle_args dev_irq; - int err; - int irq; - - err = of_irq_parse_pci(dev, &dev_irq); - if (err) { - pr_err("pci %s: unable to get irq map, err=%d\n", - pci_name((struct pci_dev *) dev), err); - return 0; - } - - irq = irq_create_of_mapping(&dev_irq); - - if (irq == 0) - pr_crit("pci %s: no irq found for pin %u\n", - pci_name((struct pci_dev *) dev), pin); - else - pr_info("pci %s: using irq %d for pin %u\n", - pci_name((struct pci_dev *) dev), irq, pin); - - return irq; + return of_irq_parse_and_map_pci(dev, slot, pin); } int pcibios_plat_dev_init(struct pci_dev *dev) |