From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from aserp1040.oracle.com ([141.146.126.69]:32323 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755429Ab3A0TY0 (ORCPT ); Sun, 27 Jan 2013 14:24:26 -0500 From: Yinghai Lu To: Bjorn Helgaas , Jiang Liu , "Rafael J. Wysocki" , Taku Izumi , Toshi Kani Cc: "Greg Kroah-Hartman" , linux-pci@vger.kernel.org, Yinghai Lu , "David S. Miller" , sparclinux@vger.kernel.org Subject: [PATCH v3 13/22] PCI, sparc: Kill pci_find_next_bus Date: Sun, 27 Jan 2013 11:23:40 -0800 Message-Id: <1359314629-18651-14-git-send-email-yinghai@kernel.org> In-Reply-To: <1359314629-18651-1-git-send-email-yinghai@kernel.org> References: <1359314629-18651-1-git-send-email-yinghai@kernel.org> Sender: linux-pci-owner@vger.kernel.org List-ID: Replace that with hotplug-safe version iteration. Signed-off-by: Yinghai Lu Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Acked-by: David S. Miller --- arch/sparc/kernel/pci.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index 75b31bc..403f6e0 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c @@ -997,11 +997,13 @@ static void __devinit pci_bus_slot_names(struct device_node *node, static int __init of_pci_slot_init(void) { - struct pci_bus *pbus = NULL; + struct pci_host_bridge *host_bridge = NULL; + struct pci_bus *pbus; - while ((pbus = pci_find_next_bus(pbus)) != NULL) { + for_each_pci_host_bridge(host_bridge) { struct device_node *node; + pbus = host_bridge->bus; if (pbus->self) { /* PCI->PCI bridge */ node = pbus->self->dev.of_node; -- 1.7.10.4