summaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/acpiphp_glue.c
diff options
context:
space:
mode:
authorYijing Wang <wangyijing@huawei.com>2014-02-13 14:13:58 +0100
committerBjorn Helgaas <bhelgaas@google.com>2014-02-14 19:20:50 +0100
commitc6f0d5adc21e2d9623fe757f35a0a642a1d863c4 (patch)
tree04dc2686d6397cfa9064eaf98b8712387a2493c0 /drivers/pci/hotplug/acpiphp_glue.c
parentLinus 3.14-rc1 (diff)
downloadlinux-c6f0d5adc21e2d9623fe757f35a0a642a1d863c4.tar.xz
linux-c6f0d5adc21e2d9623fe757f35a0a642a1d863c4.zip
ACPI / hotplug / PCI: Use list_for_each_entry() for bus traversal
Replace list_for_each() + pci_bus_b() with list_for_each_entry(). Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Rafael J. Wysocki <rjw@rjwysocki.net>
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_glue.c')
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index cd929aed3613..aee6a0acbbe9 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -450,7 +450,7 @@ static void cleanup_bridge(struct acpiphp_bridge *bridge)
*/
static unsigned char acpiphp_max_busnr(struct pci_bus *bus)
{
- struct list_head *tmp;
+ struct pci_bus *tmp;
unsigned char max, n;
/*
@@ -463,8 +463,8 @@ static unsigned char acpiphp_max_busnr(struct pci_bus *bus)
*/
max = bus->busn_res.start;
- list_for_each(tmp, &bus->children) {
- n = pci_bus_max_busnr(pci_bus_b(tmp));
+ list_for_each_entry(tmp, &bus->children, node) {
+ n = pci_bus_max_busnr(tmp);
if (n > max)
max = n;
}