From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Liviu Dudau To: Bjorn Helgaas , Catalin Marinas , Will Deacon , Benjamin Herrenschmidt , Arnd Bergmann , Russell King , Tanmay Inamdar , Grant Likely , Sinan Kaya , Jingoo Han , Kukjin Kim , Suravee Suthikulanit , linux-pci Cc: linux-arch , LKML , Device Tree ML , LAKML Subject: [PATCH v9 02/12] PCI: OF: Parse and map the IRQ when adding the PCI device. Date: Tue, 12 Aug 2014 17:25:15 +0100 Message-Id: <1407860725-25202-3-git-send-email-Liviu.Dudau@arm.com> In-Reply-To: <1407860725-25202-1-git-send-email-Liviu.Dudau@arm.com> References: <1407860725-25202-1-git-send-email-Liviu.Dudau@arm.com> Sender: linux-arch-owner@vger.kernel.org List-ID: Enhance the default implementation of pcibios_add_device() to parse and map the IRQ of the device if a DT binding is available. Cc: Bjorn Helgaas Cc: Grant Likely Cc: Rob Herring Signed-off-by: Liviu Dudau --- drivers/pci/pci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 1c8592b..29d1775 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -1453,6 +1454,8 @@ EXPORT_SYMBOL(pcim_pin_device); */ int __weak pcibios_add_device(struct pci_dev *dev) { + dev->irq = of_irq_parse_and_map_pci(dev, 0, 0); + return 0; } -- 2.0.4