From patchwork Sun Jan 27 05:36:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 215950 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id BFB6B2C0090 for ; Sun, 27 Jan 2013 16:37:48 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755833Ab3A0Fhs (ORCPT ); Sun, 27 Jan 2013 00:37:48 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:47495 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755816Ab3A0Fhr (ORCPT ); Sun, 27 Jan 2013 00:37:47 -0500 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id r0R5bc8T001006 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 27 Jan 2013 05:37:39 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r0R5bcKG026495 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 27 Jan 2013 05:37:38 GMT Received: from abhmt114.oracle.com (abhmt114.oracle.com [141.146.116.66]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id r0R5bcCc014607; Sat, 26 Jan 2013 23:37:38 -0600 Received: from linux-siqj.site (/75.36.253.103) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 26 Jan 2013 21:37:37 -0800 From: Yinghai Lu To: Bjorn Helgaas , Jiang Liu , "Rafael J. Wysocki" , Taku Izumi Cc: linux-pci@vger.kernel.org, Yinghai Lu Subject: [PATCH v2 06/22] PCI, hotplug: Kill pci_find_next_bus in sgi_hotplug Date: Sat, 26 Jan 2013 21:36:27 -0800 Message-Id: <1359265003-16166-7-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1359265003-16166-1-git-send-email-yinghai@kernel.org> References: <1359265003-16166-1-git-send-email-yinghai@kernel.org> X-Source-IP: acsinet21.oracle.com [141.146.126.237] Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Signed-off-by: Yinghai Lu --- drivers/pci/hotplug/sgi_hotplug.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pci/hotplug/sgi_hotplug.c b/drivers/pci/hotplug/sgi_hotplug.c index 180e760..ea81618 100644 --- a/drivers/pci/hotplug/sgi_hotplug.c +++ b/drivers/pci/hotplug/sgi_hotplug.c @@ -669,7 +669,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; @@ -681,7 +681,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;