summaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorRajesh Shah <rajesh.shah@intel.com>2005-04-28 00:25:49 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-27 21:52:40 -0700
commit6ef6f0e33c4645fc8d23201ad5a6a289b4303cbb (patch)
treeff7861a550b5eea24788ccc07ca0df5294f9067b /drivers/pci/probe.c
parente4ea9bb7e9f177e03a917b1f1213de0315f819ee (diff)
downloadop-kernel-dev-6ef6f0e33c4645fc8d23201ad5a6a289b4303cbb.zip
op-kernel-dev-6ef6f0e33c4645fc8d23201ad5a6a289b4303cbb.tar.gz
[PATCH] acpi bridge hotadd: Link newly created pci child bus to its parent on creation
When a pci child bus is created, add it to the parent's children list immediately rather than waiting till pci_bus_add_devices(). For hot-plug bridges/devices, pci_bus_add_devices() may be called much later, after they have been properly configured. In the meantime, this allows us to use the normal pci bus search functions for the hot-plug bridges/buses. Signed-off-by: Rajesh Shah <rajesh.shah@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 7d171f8..6a0a82f 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -450,7 +450,7 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max
return max;
}
- child = pci_alloc_child_bus(bus, dev, busnr);
+ child = pci_add_new_bus(bus, dev, busnr);
if (!child)
return max;
child->primary = buses & 0xFF;
@@ -477,7 +477,7 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max
* This can happen when a bridge is hot-plugged */
if (pci_find_bus(pci_domain_nr(bus), max+1))
return max;
- child = pci_alloc_child_bus(bus, dev, ++max);
+ child = pci_add_new_bus(bus, dev, ++max);
buses = (buses & 0xff000000)
| ((unsigned int)(child->primary) << 0)
| ((unsigned int)(child->secondary) << 8)
OpenPOWER on IntegriCloud