From patchwork Tue Aug 4 21:54:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 6944731 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 D77219F358 for ; Tue, 4 Aug 2015 21:57:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E175C20553 for ; Tue, 4 Aug 2015 21:57:31 +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 16A13204E3 for ; Tue, 4 Aug 2015 21:57:31 +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 1ZMkB3-0001e5-Ew; Tue, 04 Aug 2015 21:55:17 +0000 Received: from mail-io0-x236.google.com ([2607:f8b0:4001:c06::236]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZMkAr-0000g0-QJ for linux-arm-kernel@lists.infradead.org; Tue, 04 Aug 2015 21:55:07 +0000 Received: by ioeg141 with SMTP id g141so31188703ioe.3 for ; Tue, 04 Aug 2015 14:54:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=rIzob4JxdpYOtuJ60E/9sCgWSkz3vdNvsa9v/GokxTw=; b=Q8fFfHXS3HiScEIgfqQ28CDa3o58IdzJE+ZmQfeDxA+vPFTrLhi2xtRRV0tOqGfyWv C+kaKcTjMCNVtqQpftrTIPeN5owE9fdfp0vj5omXE43wVm3DLQ0bPVxkZIO+kBytT+LW cBU7NPzQ7b+VdXS+D5x7bx5olGSDgIObtxGXfgYsKZ5XdK15j+kx+Aj6gC77N7k7xZRW W+8s9C/JiA0YhyAjTTICfJYVLiXu28+6IkXhBQeuch3Hi8NXMlmfn7MUNCC7/8gi1f7o YufHJjRrolM6e9AOWowaFRrmWps3CvPOIeOfqXAwvCNE7DRJAQ9CSFq0HOkx6MybDCqm RQWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=rIzob4JxdpYOtuJ60E/9sCgWSkz3vdNvsa9v/GokxTw=; b=j5zMy360UlQUNqNRMdtMVSpIne/yeWZPBlRxhi/oYH4zpJNQ7xpNRtVcK8FjDSoOH9 Icth4Z2gAKLdt7Je6nismLgSGtB1NPOd9qi5R3zVz9EbDhvU6nEeaxnqA8hdMJYSqaEP QXuA3gC590BfIm9H2RAitRFX4wuUrn8pUod/QME1dQvAeYsQRC5VJniaEsX6pYqnC2Cn b4KhaqIqc9z23/VT1lUNEkYgsgtedIUZ9aDgb0oN1H7czLHKQNnybDDRp0EkrZDcfjUS 0yOuzyhFDwsNs/1hVKU+lbrG5m1V5sl9g2qfuHm7QTpUbFfb/rtF5yNUU7Z1zNRsXmz2 V0Sg== X-Gm-Message-State: ALoCoQnOnyg2wSnj8z1rAj2HRtRtMZjxIsVcXXslYO5duaQYFzqx/hyNEndhnXq4Z5XwkBotoI2K X-Received: by 10.107.7.214 with SMTP id g83mr6932815ioi.28.1438725285092; Tue, 04 Aug 2015 14:54:45 -0700 (PDT) Received: from localhost ([69.71.1.1]) by smtp.gmail.com with ESMTPSA id r95sm501507ioi.38.2015.08.04.14.54.43 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 04 Aug 2015 14:54:43 -0700 (PDT) Subject: [PATCH v5 7/9] PCI: xgene: Set msi_controller->dev to platform_device, not pci_bus To: Lorenzo Pieralisi From: Bjorn Helgaas Date: Tue, 04 Aug 2015 16:54:42 -0500 Message-ID: <20150804215442.9189.83038.stgit@bhelgaas-glaptop2.roam.corp.google.com> In-Reply-To: <20150804214234.9189.42548.stgit@bhelgaas-glaptop2.roam.corp.google.com> References: <20150804214234.9189.42548.stgit@bhelgaas-glaptop2.roam.corp.google.com> User-Agent: StGit/0.16 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150804_145506_126026_ED368DBB X-CRM114-Status: GOOD ( 13.81 ) X-Spam-Score: -2.1 (--) 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: Thomas Petazzoni , Duc Dang , Russell King , Arnd Bergmann , Gabriele Paoloni , Marc Zyngier , linux-pci@vger.kernel.org, Pratyush Anand , Michal Simek , Simon Horman , James Morse , Tanmay Inamdar , Jingoo Han , Thierry Reding , Jayachandran C , linux-arm-kernel@lists.infradead.org, Jason Cooper 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.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID, 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 Other users of struct msi_controller set msi->dev to the platform_device of the PCI host controller, not the device of the pci_bus for the root bus. Set X-Gene's msi_controller->dev to the PCI host controller platform_device as other platforms do. Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pci-xgene.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c index 4c2fb1f..5e0d6de 100644 --- a/drivers/pci/host/pci-xgene.c +++ b/drivers/pci/host/pci-xgene.c @@ -501,7 +501,8 @@ static int xgene_pcie_setup(struct xgene_pcie_port *port, return 0; } -static int xgene_pcie_msi_enable(struct pci_bus *bus) +static int xgene_pcie_msi_enable(struct xgene_pcie_port *port, + struct pci_bus *bus) { struct device_node *msi_node; @@ -515,7 +516,7 @@ static int xgene_pcie_msi_enable(struct pci_bus *bus) return -ENODEV; of_node_put(msi_node); - bus->msi->dev = &bus->dev; + bus->msi->dev = &port->dev; return 0; } @@ -560,7 +561,7 @@ static int xgene_pcie_probe_bridge(struct platform_device *pdev) return -ENOMEM; if (IS_ENABLED(CONFIG_PCI_MSI)) - if (xgene_pcie_msi_enable(bus)) + if (xgene_pcie_msi_enable(port, bus)) dev_info(port->dev, "failed to enable MSI\n"); pci_scan_child_bus(bus);