From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcsinet15.oracle.com ([148.87.113.117]:35512 "EHLO rcsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753888Ab2IYI0o (ORCPT ); Tue, 25 Sep 2012 04:26:44 -0400 From: Yinghai Lu To: Bjorn Helgaas , Len Brown Cc: linux-pci@vger.kernel.org, Yinghai Lu Subject: [PATCH 13/29] PCI, hotplug: kill pci_find_next_bus n sgi_hotplug Date: Tue, 25 Sep 2012 01:26:14 -0700 Message-Id: <1348561590-28067-14-git-send-email-yinghai@kernel.org> In-Reply-To: <1348561590-28067-1-git-send-email-yinghai@kernel.org> References: <1348561590-28067-1-git-send-email-yinghai@kernel.org> Sender: linux-pci-owner@vger.kernel.org List-ID: Signed-off-by: Yinghai Lu --- drivers/pci/hotplug/sgi_hotplug.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c index f64ca92..2ec23bf 100644 --- a/drivers/pci/hotplug/sgi_hotplug.c +++ b/drivers/pci/hotplug/sgi_hotplug.c @@ -678,7 +678,7 @@ alloc_err: static int __init sn_pci_hotplug_init(void) { - struct pci_bus *pci_bus = NULL; + struct pci_host_bridge *host_bridge = NULL; int rc; int registered = 0; @@ -690,7 +690,9 @@ static int __init sn_pci_hotplug_init(void) INIT_LIST_HEAD(&sn_hp_list); - while ((pci_bus = pci_find_next_bus(pci_bus))) { + for_each_pci_host_bridge(host_bridge) { + struct pci_bus *pci_bus = host_bridge->bus; + if (!pci_bus->sysdata) continue; -- 1.7.7