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>
This commit is contained in:
parent
38dbfb59d1
commit
c6f0d5adc2
|
@ -450,7 +450,7 @@ static void cleanup_bridge(struct acpiphp_bridge *bridge)
|
||||||
*/
|
*/
|
||||||
static unsigned char acpiphp_max_busnr(struct pci_bus *bus)
|
static unsigned char acpiphp_max_busnr(struct pci_bus *bus)
|
||||||
{
|
{
|
||||||
struct list_head *tmp;
|
struct pci_bus *tmp;
|
||||||
unsigned char max, n;
|
unsigned char max, n;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -463,8 +463,8 @@ static unsigned char acpiphp_max_busnr(struct pci_bus *bus)
|
||||||
*/
|
*/
|
||||||
max = bus->busn_res.start;
|
max = bus->busn_res.start;
|
||||||
|
|
||||||
list_for_each(tmp, &bus->children) {
|
list_for_each_entry(tmp, &bus->children, node) {
|
||||||
n = pci_bus_max_busnr(pci_bus_b(tmp));
|
n = pci_bus_max_busnr(tmp);
|
||||||
if (n > max)
|
if (n > max)
|
||||||
max = n;
|
max = n;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue