From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1119DC433E3 for ; Fri, 22 May 2020 23:48:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D892E20723 for ; Fri, 22 May 2020 23:48:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590191330; bh=DwKzsC//kDJxl4wpgqBdvPofzofJg3/4Ka1tXFw0uwg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Hl9u6/5l3PkvWXAZOBM4tNCs0J7IhqArO/13RjYRjqKXme/kkgUzvf8bX8zuyGnQ9 yyIajfhWA5sfWK6XNA0AlRMX5rTY+G/Px/DtkiFWNCpRmLDm0lQ73TBxNDhpg16Tit rizNRhl+tGPQ1ftAi5dhqAWu88GoJJDnVo6srZPk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387438AbgEVXsu (ORCPT ); Fri, 22 May 2020 19:48:50 -0400 Received: from mail-il1-f195.google.com ([209.85.166.195]:42427 "EHLO mail-il1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387413AbgEVXst (ORCPT ); Fri, 22 May 2020 19:48:49 -0400 Received: by mail-il1-f195.google.com with SMTP id 18so12526249iln.9 for ; Fri, 22 May 2020 16:48:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=t2p41fcnPOx/cmrCAPQSy3Fo8KrPmpfN6+RkySuTptI=; b=pU6pC7fpK+mexpvjTKHkGk0kcMmyiHXNZaTL8zwqPgTPOLzm9/Ub9aqGrz6CbpFKjP wM1SrTitSotL2gHIwGKah62m1BmnskGehJBPC8BY+CYKs5sfgzH+kiXLpTd87Lwktz80 94zfrLa6XJ/xeGYfBl941Uo5C10ykpBRLYt5AqWccIWk+xav3nbeCoU2p7DVCtQq/XOv mCChcoUy8mRhVOTFz+tESkItEgHzGqwWipuuXLDoEY8BAZ9nGw3OjfUU7sih9WBct245 RQASY82kK4N81KnzkKD2Iyurt3FOLWmTKvekLYUhA+zQgZPWDsRlsudaGahefwQVe/ty g97w== X-Gm-Message-State: AOAM5312WTzFBMFcN3rEJh7Lwxc4mR27Z+wPkoL6fhOwz1Mt6c7zTCv/ 0rgCD5BZCYndCAM/Pe46mg== X-Google-Smtp-Source: ABdhPJxJb8uMVFTBmE5EjVEFecM8hhfGGfXlSi7Mekr5euEb9ImK+hXgQFJSBd65bfpss/2gmn1F4A== X-Received: by 2002:a92:8d49:: with SMTP id s70mr15410384ild.54.1590191328942; Fri, 22 May 2020 16:48:48 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.252]) by smtp.googlemail.com with ESMTPSA id w23sm4390877iod.9.2020.05.22.16.48.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:48 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Michal Simek Subject: [PATCH 14/15] PCI: xilinx-nwl: Use pci_host_probe() to register host Date: Fri, 22 May 2020 17:48:31 -0600 Message-Id: <20200522234832.954484-15-robh@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200522234832.954484-1-robh@kernel.org> References: <20200522234832.954484-1-robh@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The xilinx-nwl host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. The only difference is pci_assign_unassigned_bus_resources() was called instead of pci_bus_size_bridges() and pci_bus_assign_resources(). This should be the same. Cc: Michal Simek Signed-off-by: Rob Herring --- drivers/pci/controller/pcie-xilinx-nwl.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/pci/controller/pcie-xilinx-nwl.c b/drivers/pci/controller/pcie-xilinx-nwl.c index 9bd1427f2fd6..32a0b08d6da5 100644 --- a/drivers/pci/controller/pcie-xilinx-nwl.c +++ b/drivers/pci/controller/pcie-xilinx-nwl.c @@ -817,8 +817,6 @@ static int nwl_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct nwl_pcie *pcie; - struct pci_bus *bus; - struct pci_bus *child; struct pci_host_bridge *bridge; int err; @@ -871,17 +869,7 @@ static int nwl_pcie_probe(struct platform_device *pdev) } } - err = pci_scan_root_bus_bridge(bridge); - if (err) - return err; - - bus = bridge->bus; - - pci_assign_unassigned_bus_resources(bus); - list_for_each_entry(child, &bus->children, node) - pcie_bus_configure_settings(child); - pci_bus_add_devices(bus); - return 0; + return pci_host_probe(bridge); } static struct platform_driver nwl_pcie_driver = { -- 2.25.1