From patchwork Fri Sep 11 23:21:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Daney X-Patchwork-Id: 7165661 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5C9309F314 for ; Fri, 11 Sep 2015 23:24:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 26590206EC for ; Fri, 11 Sep 2015 23:24:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 49AD0206D0 for ; Fri, 11 Sep 2015 23:24:22 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZaXeN-0005WK-UH; Fri, 11 Sep 2015 23:22:35 +0000 Received: from mail-io0-x229.google.com ([2607:f8b0:4001:c06::229]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZaXeE-0005J0-Nk for linux-arm-kernel@lists.infradead.org; Fri, 11 Sep 2015 23:22:27 +0000 Received: by iofh134 with SMTP id h134so115083904iof.0 for ; Fri, 11 Sep 2015 16:22:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MYm/8hz5eHFgH2MY6oCdFTVaYI3VzTWcoSgl87q7x78=; b=ecjIsS5BErr5gDiBCOFoh6+JOiMvPb2BZqwPKIf8q52eeC3F/manoyEjuMpONyzSxN eJhsZxmawobh7BSn0FZ6eN1NpeLRPw2SjRjdU+oEasUPLp1gSPcbA35Uu90gL8TxkV79 QGBpxvGBPTcsFMeILieBcfLr2VWPawJHX7Ragtb5UbdATjUGLNfRilMsV5DOIXzN5ggq AlIPY7PR1UtT2oEMkh44fpsp7knUc84pnJj61GUtucWqDqAmL1fegJRhYVH3sAPW4S+q kOnlEdUEw/M8c+qKLiAeNtPuKP45ALX71S11HuVrtYymWGtVZS/pRhbzlL9iTIVBw/hz coVw== X-Received: by 10.107.15.27 with SMTP id x27mr7829359ioi.51.1442013725804; Fri, 11 Sep 2015 16:22:05 -0700 (PDT) Received: from dl.caveonetworks.com (64.2.3.194.ptr.us.xo.net. [64.2.3.194]) by smtp.gmail.com with ESMTPSA id 10sm1184722ios.28.2015.09.11.16.22.03 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 11 Sep 2015 16:22:04 -0700 (PDT) Received: from dl.caveonetworks.com (localhost.localdomain [127.0.0.1]) by dl.caveonetworks.com (8.14.5/8.14.5) with ESMTP id t8BNM2g5005045; Fri, 11 Sep 2015 16:22:02 -0700 Received: (from ddaney@localhost) by dl.caveonetworks.com (8.14.5/8.14.5/Submit) id t8BNM2o1005044; Fri, 11 Sep 2015 16:22:02 -0700 From: David Daney To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , Frank Rowand , Grant Likely , Bjorn Helgaas , linux-pci@vger.kernel.org, Will Deacon , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/6] PCI: Make global and export pdev_fixup_irq(). Date: Fri, 11 Sep 2015 16:21:54 -0700 Message-Id: <1442013719-5001-2-git-send-email-ddaney.cavm@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1442013719-5001-1-git-send-email-ddaney.cavm@gmail.com> References: <1442013719-5001-1-git-send-email-ddaney.cavm@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150911_162226_848526_74AE6A0F X-CRM114-Status: GOOD ( 12.22 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Daney MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: David Daney Follow-on patch will use pdev_fixup_irq(). So, make it visible and export it. Signed-off-by: David Daney --- drivers/pci/setup-irq.c | 7 ++++--- include/linux/pci.h | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/pci/setup-irq.c b/drivers/pci/setup-irq.c index 95c225b..ac7ffaf 100644 --- a/drivers/pci/setup-irq.c +++ b/drivers/pci/setup-irq.c @@ -22,9 +22,9 @@ void __weak pcibios_update_irq(struct pci_dev *dev, int irq) pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); } -static void pdev_fixup_irq(struct pci_dev *dev, - u8 (*swizzle)(struct pci_dev *, u8 *), - int (*map_irq)(const struct pci_dev *, u8, u8)) +void pdev_fixup_irq(struct pci_dev *dev, + u8 (*swizzle)(struct pci_dev *, u8 *), + int (*map_irq)(const struct pci_dev *, u8, u8)) { u8 pin, slot; int irq = 0; @@ -56,6 +56,7 @@ static void pdev_fixup_irq(struct pci_dev *dev, the real IRQ to use; the device does not use it. */ pcibios_update_irq(dev, irq); } +EXPORT_SYMBOL_GPL(pdev_fixup_irq); void pci_fixup_irqs(u8 (*swizzle)(struct pci_dev *, u8 *), int (*map_irq)(const struct pci_dev *, u8, u8)) diff --git a/include/linux/pci.h b/include/linux/pci.h index e90eb22..50e66ab 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1120,6 +1120,9 @@ void pdev_enable_device(struct pci_dev *); int pci_enable_resources(struct pci_dev *, int mask); void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *), int (*)(const struct pci_dev *, u8, u8)); +void pdev_fixup_irq(struct pci_dev *, + u8 (*)(struct pci_dev *, u8 *), + int (*)(const struct pci_dev *, u8, u8)); #define HAVE_PCI_REQ_REGIONS 2 int __must_check pci_request_regions(struct pci_dev *, const char *); int __must_check pci_request_regions_exclusive(struct pci_dev *, const char *);