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: 6286121 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@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 B13C8BEEE1 for ; Tue, 28 Apr 2015 07:08:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E2BA3202B4 for ; Tue, 28 Apr 2015 07:08:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E835320351 for ; Tue, 28 Apr 2015 07:08:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753201AbbD1HIK (ORCPT ); Tue, 28 Apr 2015 03:08:10 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:55413 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753163AbbD1HII (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 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 CC: , , Arnd Bergmann , , Yijing Wang , Tanmay Inamdar 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 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. 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);