From patchwork Tue Sep 25 08:26:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 186722 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 7AED82C008F for ; Tue, 25 Sep 2012 18:26:53 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753479Ab2IYI0u (ORCPT ); Tue, 25 Sep 2012 04:26:50 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:42807 "EHLO acsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753890Ab2IYI0p (ORCPT ); Tue, 25 Sep 2012 04:26:45 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q8P8QdQu020134 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 25 Sep 2012 08:26:40 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q8P8QckJ020905 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 25 Sep 2012 08:26:39 GMT Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q8P8Qc4l007785; Tue, 25 Sep 2012 03:26:38 -0500 Received: from linux-siqj.site (/75.36.245.102) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 25 Sep 2012 01:26:38 -0700 From: Yinghai Lu To: Bjorn Helgaas , Len Brown Cc: linux-pci@vger.kernel.org, Yinghai Lu Subject: [PATCH 14/29] PCI: kill pci_find_next_bus in pci_sysfs Date: Tue, 25 Sep 2012 01:26:15 -0700 Message-Id: <1348561590-28067-15-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1348561590-28067-1-git-send-email-yinghai@kernel.org> References: <1348561590-28067-1-git-send-email-yinghai@kernel.org> X-Source-IP: ucsinet21.oracle.com [156.151.31.93] 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/pci-sysfs.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 02d107b..2631851 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -290,15 +290,15 @@ static ssize_t bus_rescan_store(struct bus_type *bus, const char *buf, size_t count) { unsigned long val; - struct pci_bus *b = NULL; + struct pci_host_bridge *host_bridge = NULL; if (strict_strtoul(buf, 0, &val) < 0) return -EINVAL; if (val) { mutex_lock(&pci_remove_rescan_mutex); - while ((b = pci_find_next_bus(b)) != NULL) - pci_rescan_bus(b); + for_each_pci_host_bridge(host_bridge) + pci_rescan_bus(host_bridge->bus); mutex_unlock(&pci_remove_rescan_mutex); } return count;