ChangeSet 1.1254.4.4, 2003/06/03 17:08:13-07:00, greg@kroah.com [PATCH] ACPI PCI Hotplug: remove hand made pci_find_bus function drivers/hotplug/acpiphp_glue.c | 26 +------------------------- 1 files changed, 1 insertion(+), 25 deletions(-) diff -Nru a/drivers/hotplug/acpiphp_glue.c b/drivers/hotplug/acpiphp_glue.c --- a/drivers/hotplug/acpiphp_glue.c Wed Jun 4 18:12:11 2003 +++ b/drivers/hotplug/acpiphp_glue.c Wed Jun 4 18:12:11 2003 @@ -281,30 +281,6 @@ return AE_OK; } - -/* find pci_bus structure associated to specific bus number */ -static struct pci_bus *find_pci_bus(const struct list_head *list, int bus) -{ - const struct list_head *l; - - list_for_each (l, list) { - struct pci_bus *b = pci_bus_b(l); - if (b->number == bus) - return b; - - if (!list_empty(&b->children)) { - /* XXX recursive call */ - b = find_pci_bus(&b->children, bus); - - if (b) - return b; - } - } - - return NULL; -} - - /* decode ACPI 2.0 _HPP hot plug parameters */ static void decode_hpp(struct acpiphp_bridge *bridge) { @@ -409,7 +385,7 @@ bridge->seg = seg; bridge->bus = bus; - bridge->pci_bus = find_pci_bus(&pci_root_buses, bus); + bridge->pci_bus = pci_find_bus(bus); bridge->res_lock = SPIN_LOCK_UNLOCKED;