diff options
| author | Greg Kroah-Hartman <greg@kroah.com> | 2003-06-03 03:08:13 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2003-06-03 03:08:13 -0700 |
| commit | c4bdf207cbab85147313cef78ba247c394dd1157 (patch) | |
| tree | 71725e66ee22f220e1616a303ed7f848d44fa39d | |
| parent | 9cc268e9647fe4b08cfb939ff7ac48ed67487eb1 (diff) | |
[PATCH] ACPI PCI Hotplug: remove hand made pci_find_bus function
| -rw-r--r-- | drivers/hotplug/acpiphp_glue.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/drivers/hotplug/acpiphp_glue.c b/drivers/hotplug/acpiphp_glue.c index fd5d40315e28..42cf2749cf89 100644 --- a/drivers/hotplug/acpiphp_glue.c +++ b/drivers/hotplug/acpiphp_glue.c @@ -281,30 +281,6 @@ decode_acpi_resource (struct acpi_resource *resource, void *context) 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 @@ static void add_host_bridge (acpi_handle *handle, int seg, int bus) 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; |
