From patchwork Tue Apr 28 07:01:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yijing Wang X-Patchwork-Id: 6286151 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 BF43F9F52C for ; Tue, 28 Apr 2015 07:10:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DDDCD20304 for ; Tue, 28 Apr 2015 07:10:56 +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 0BB7520131 for ; Tue, 28 Apr 2015 07:10:56 +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 1Ymzct-0005Tz-31; Tue, 28 Apr 2015 07:08:15 +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-00050L-F4 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 BFF41239; 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:34 +0800 From: Yijing Wang To: Bjorn Helgaas Subject: [PATCH Part1 v11 5/5] PCI: iproc: Use pci_scan_root_bus() instead of pci_create_root_bus() Date: Tue, 28 Apr 2015 15:01:39 +0800 Message-ID: <1430204499-19571-6-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.019F, 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: 05f2e017664aca6ccf0dca44dca9dfd3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150428_000805_712781_2DC2F529 X-CRM114-Status: UNSURE ( 8.61 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) Cc: Arnd Bergmann , linux-pci@vger.kernel.org, Ray Jui , 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. iproc 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: Ray Jui --- drivers/pci/host/pcie-iproc.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c index 329e1b5..9622ebf 100644 --- a/drivers/pci/host/pcie-iproc.c +++ b/drivers/pci/host/pcie-iproc.c @@ -210,10 +210,10 @@ int iproc_pcie_setup(struct iproc_pcie *pcie) pcie->sysdata.private_data = pcie; - bus = pci_create_root_bus(pcie->dev, 0, &iproc_pcie_ops, + bus = pci_scan_root_bus(pcie->dev, 0, &iproc_pcie_ops, &pcie->sysdata, pcie->resources); if (!bus) { - dev_err(pcie->dev, "unable to create PCI root bus\n"); + dev_err(pcie->dev, "unable to scan PCI root bus\n"); ret = -ENOMEM; goto err_power_off_phy; } @@ -227,7 +227,6 @@ int iproc_pcie_setup(struct iproc_pcie *pcie) iproc_pcie_enable(pcie); - pci_scan_child_bus(bus); pci_assign_unassigned_bus_resources(bus); pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci); pci_bus_add_devices(bus);