From patchwork Sun Jan 27 05:36:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v2,07/22] PCI: Kill pci_find_next_bus in pci_sysfs Date: Sat, 26 Jan 2013 19:36:28 -0000 From: Yinghai Lu X-Patchwork-Id: 215951 Message-Id: <1359265003-16166-8-git-send-email-yinghai@kernel.org> To: Bjorn Helgaas , Jiang Liu , "Rafael J. Wysocki" , Taku Izumi Cc: linux-pci@vger.kernel.org, Yinghai Lu Signed-off-by: Yinghai Lu --- drivers/pci/pci-sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 9c6e9bb..6f41daf 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -289,15 +289,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;