From patchwork Mon Jun 26 13:34:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryder Lee X-Patchwork-Id: 9809699 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9858960329 for ; Mon, 26 Jun 2017 13:34:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D611285AB for ; Mon, 26 Jun 2017 13:34:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9234B285AF; Mon, 26 Jun 2017 13:34:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3739285AB for ; Mon, 26 Jun 2017 13:34:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752252AbdFZNeV (ORCPT ); Mon, 26 Jun 2017 09:34:21 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:3779 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752193AbdFZNeR (ORCPT ); Mon, 26 Jun 2017 09:34:17 -0400 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1098654868; Mon, 26 Jun 2017 21:34:12 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 26 Jun 2017 21:34:11 +0800 Received: from mtkslt306.mediatek.inc (10.21.14.136) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Mon, 26 Jun 2017 21:34:11 +0800 From: Ryder Lee To: Bjorn Helgaas , Arnd Bergmann CC: Mark Brown , Lorenzo Pieralisi , , , Ryder Lee Subject: [PATCH] PCI: mediatek: change to use pci_scan_root_bus_bridge() Date: Mon, 26 Jun 2017 21:34:01 +0800 Message-ID: <1498484041-6181-2-git-send-email-ryder.lee@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1498484041-6181-1-git-send-email-ryder.lee@mediatek.com> References: <1498484041-6181-1-git-send-email-ryder.lee@mediatek.com> MIME-Version: 1.0 X-MTK: N Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is a critical patch fixes Build bot failed: > arm-allmodconfig > ../drivers/pci/host/pcie-mediatek.c:485:8: error: implicit declaration of function 'pci_register_host_bridge' [-Werror=implicit-function-declaration] It uses the new registration methods pci_scan_root_bus_bridge(). Signed-off-by: Ryder Lee --- drivers/pci/host/pcie-mediatek.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/pci/host/pcie-mediatek.c b/drivers/pci/host/pcie-mediatek.c index 3baafa8..514ef34 100644 --- a/drivers/pci/host/pcie-mediatek.c +++ b/drivers/pci/host/pcie-mediatek.c @@ -482,12 +482,10 @@ static int mtk_pcie_register_host(struct pci_host_bridge *host) host->dev.parent = pcie->dev; host->ops = &mtk_pcie_ops; - err = pci_register_host_bridge(host); + err = pci_scan_root_bus_bridge(host); if (err < 0) return err; - pci_scan_child_bus(host->bus); - pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci); pci_bus_size_bridges(host->bus); pci_bus_assign_resources(host->bus); @@ -506,7 +504,7 @@ static int mtk_pcie_probe(struct platform_device *pdev) struct pci_host_bridge *host; int err; - host = pci_alloc_host_bridge(sizeof(*pcie)); + host = devm_pci_alloc_host_bridge(&pdev->dev, sizeof(*pcie)); if (!host) return -ENOMEM;