From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yijing Wang Subject: [PATCH v7 24/31] PCI/tegra: Remove redundant tegra_pcie_scan_bus() Date: Mon, 23 Mar 2015 20:40:50 +0800 Message-ID: <1427114457-16687-25-git-send-email-wangyijing__19437.5879633755$1427115146$gmane$org@huawei.com> References: <1427114457-16687-1-git-send-email-wangyijing@huawei.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <1427114457-16687-1-git-send-email-wangyijing@huawei.com> Sender: linux-m68k-owner@vger.kernel.org List-Id: linux-m68k@vger.kernel.org To: Bjorn Helgaas Cc: Jiang Liu , linux-pci@vger.kernel.org, Yinghai Lu , linux-kernel@vger.kernel.org, Marc Zyngier , linux-arm-kernel@lists.infradead.org, Russell King , x86@kernel.org, Thomas Gleixner , Benjamin Herrenschmidt , Rusty Russell , Tony Luck , linux-ia64@vger.kernel.org, "David S. Miller" , Guan Xuetao , linux-alpha@vger.kernel.org, linux-m68k@lists.linux-m68k.org, Liviu Dudau , Arnd Bergmann , Geert Uytterhoeven , Yijing Wang , Thierry Reding , linux-tegra@vger.kernel.org Now pci_scan_root_bus() is almost similar to pci_create_root_bus() + pci_scan_child_bus(). So we could use common pci_scan_root_bus() in pci_common_init_dev() to scan pci busses. tegra_pcie_scan_bus() is redundant, remove it. Signed-off-by: Yijing Wang CC: Thierry Reding CC: linux-tegra@vger.kernel.org --- drivers/pci/host/pci-tegra.c | 16 ---------------- 1 files changed, 0 insertions(+), 16 deletions(-) diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c index 94e9362..10c0571 100644 --- a/drivers/pci/host/pci-tegra.c +++ b/drivers/pci/host/pci-tegra.c @@ -630,21 +630,6 @@ static int tegra_pcie_map_irq(const struct pci_dev *pdev, u8 slot, u8 pin) return irq; } -static struct pci_bus *tegra_pcie_scan_bus(int nr, struct pci_sys_data *sys) -{ - struct tegra_pcie *pcie = sys_to_pcie(sys); - struct pci_bus *bus; - - bus = pci_create_root_bus(pcie->dev, -1, sys->busnr, &tegra_pcie_ops, - sys, &sys->resources); - if (!bus) - return NULL; - - pci_scan_child_bus(bus); - - return bus; -} - static irqreturn_t tegra_pcie_isr(int irq, void *arg) { const char *err_msg[] = { @@ -1831,7 +1816,6 @@ static int tegra_pcie_enable(struct tegra_pcie *pcie) hw.private_data = (void **)&pcie; hw.setup = tegra_pcie_setup; hw.map_irq = tegra_pcie_map_irq; - hw.scan = tegra_pcie_scan_bus; hw.ops = &tegra_pcie_ops; pci_common_init_dev(pcie->dev, &hw); -- 1.7.1