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: 6286111 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 B40829F373 for ; Tue, 28 Apr 2015 07:08:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E5CF020306 for ; Tue, 28 Apr 2015 07:08:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5B81C202B4 for ; Tue, 28 Apr 2015 07:08:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751889AbbD1HIJ (ORCPT ); Tue, 28 Apr 2015 03:08:09 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:55414 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752047AbbD1HII (ORCPT ); Tue, 28 Apr 2015 03:08:08 -0400 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 CC: , , Arnd Bergmann , , Yijing Wang , Ray Jui 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 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=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);