From patchwork Thu Jan 8 17:06:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 5594151 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@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 EC7F99F443 for ; Thu, 8 Jan 2015 17:07:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 35AD6203B0 for ; Thu, 8 Jan 2015 17:07:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5A0F52035D for ; Thu, 8 Jan 2015 17:07:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932473AbbAHRGd (ORCPT ); Thu, 8 Jan 2015 12:06:33 -0500 Received: from foss-mx-na.foss.arm.com ([217.140.108.86]:58115 "EHLO foss-mx-na.foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932418AbbAHRGb (ORCPT ); Thu, 8 Jan 2015 12:06:31 -0500 Received: from foss-smtp-na-1.foss.arm.com (unknown [10.80.61.8]) by foss-mx-na.foss.arm.com (Postfix) with ESMTP id 131004EB; Thu, 8 Jan 2015 11:06:23 -0600 (CST) Received: from collaborate-mta1.arm.com (highbank-bc01-b06.austin.arm.com [10.112.81.134]) by foss-smtp-na-1.foss.arm.com (Postfix) with ESMTP id BFB295FAD7; Thu, 8 Jan 2015 11:06:20 -0600 (CST) Received: from approximate.cambridge.arm.com (approximate.cambridge.arm.com [10.1.209.148]) by collaborate-mta1.arm.com (Postfix) with ESMTP id 8EBFE13F78C; Thu, 8 Jan 2015 11:06:19 -0600 (CST) From: Marc Zyngier To: Bjorn Helgaas , Thomas Gleixner , Jiang Liu Cc: , , , Yijing Wang , Suravee Suthikulpanit Subject: [PATCH v2 5/8] PCI/MSI: Let pci_msi_get_domain use struct device's msi_domain Date: Thu, 8 Jan 2015 17:06:09 +0000 Message-Id: <1420736772-11088-6-git-send-email-marc.zyngier@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1420736772-11088-1-git-send-email-marc.zyngier@arm.com> References: <1420736772-11088-1-git-send-email-marc.zyngier@arm.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Now that we can easily find which MSI domain a PCI device is using, use dev_get_msi_domain as a way to retrieve the information. The original code is still used as a fallback. Signed-off-by: Marc Zyngier --- drivers/pci/msi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index fd60806..003040b 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -41,7 +41,8 @@ static struct irq_domain *pci_msi_get_domain(struct pci_dev *dev) { struct irq_domain *domain = NULL; - if (dev->bus->msi) + domain = dev_get_msi_domain(&dev->dev); + if (!domain && dev->bus->msi) domain = dev->bus->msi->domain; if (!domain) domain = arch_get_pci_msi_domain(dev);