From patchwork Tue Apr 28 07:01:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yijing Wang X-Patchwork-Id: 6286171 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 79E0EBEEE1 for ; Tue, 28 Apr 2015 07:12:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A1A3D20306 for ; Tue, 28 Apr 2015 07:12:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B8DAF20131 for ; Tue, 28 Apr 2015 07:12:10 +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 1Ymze3-0006Jm-5r; Tue, 28 Apr 2015 07:09:27 +0000 Received: from szxga03-in.huawei.com ([119.145.14.66]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ymzcj-00050e-FL for linux-arm-kernel@lists.infradead.org; Tue, 28 Apr 2015 07:08:06 +0000 Received: from 172.24.2.119 (EHLO szxeml430-hub.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BFF41238; Tue, 28 Apr 2015 15:05:44 +0800 (CST) Received: from localhost.localdomain (10.175.100.166) by szxeml430-hub.china.huawei.com (10.82.67.185) with Microsoft SMTP Server id 14.3.158.1; Tue, 28 Apr 2015 15:05:32 +0800 From: Yijing Wang To: Bjorn Helgaas Subject: [PATCH Part1 v11 4/5] PCI: xgene: Use pci_scan_root_bus() instead of pci_create_root_bus() Date: Tue, 28 Apr 2015 15:01:38 +0800 Message-ID: <1430204499-19571-5-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1430204499-19571-1-git-send-email-wangyijing@huawei.com> References: <1430204499-19571-1-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.100.166] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.553F3148.0126, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 2ce40142dbadd8b40fb16ab2a24fe124 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150428_000805_698188_95254503 X-CRM114-Status: UNSURE ( 8.77 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) Cc: Arnd Bergmann , linux-pci@vger.kernel.org, Tanmay Inamdar , Yijing Wang , linux-arm-kernel@lists.infradead.org, dja@axtens.net X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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, RCVD_IN_DNSWL_MED, 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 Pci_bus_add_devices() was ripped out of pci_scan_root_bus(). Now pci_scan_root_bus() == pci_create_root_bus() + pci_scan_child_bus() if busn resource is supplied. Xgene added the busn resource to resources list in of_pci_get_host_bridge_resources(). So it should be safe to use pci_scan_root_bus() instead. Signed-off-by: Yijing Wang CC: Tanmay Inamdar Acked-by: Tanmay Inamdar --- drivers/pci/host/pci-xgene.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c index ee082c0..87e3962 100644 --- a/drivers/pci/host/pci-xgene.c +++ b/drivers/pci/host/pci-xgene.c @@ -499,12 +499,11 @@ static int xgene_pcie_probe_bridge(struct platform_device *pdev) if (ret) return ret; - bus = pci_create_root_bus(&pdev->dev, 0, + bus = pci_scan_root_bus(&pdev->dev, 0, &xgene_pcie_ops, port, &res); if (!bus) return -ENOMEM; - pci_scan_child_bus(bus); pci_assign_unassigned_bus_resources(bus); pci_bus_add_devices(bus);