Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3845
b: refs/heads/master
c: 6ef6f0e
h: refs/heads/master
i:
  3843: c6a9a17
v: v3
  • Loading branch information
Rajesh Shah authored and Greg Kroah-Hartman committed Jun 28, 2005
1 parent 5c64e3a commit b4760db
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4ea9bb7e9f177e03a917b1f1213de0315f819ee
refs/heads/master: 6ef6f0e33c4645fc8d23201ad5a6a289b4303cbb
11 changes: 7 additions & 4 deletions trunk/drivers/pci/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,13 @@ void __devinit pci_bus_add_devices(struct pci_bus *bus)
* If there is an unattached subordinate bus, attach
* it and then scan for unattached PCI devices.
*/
if (dev->subordinate && list_empty(&dev->subordinate->node)) {
spin_lock(&pci_bus_lock);
list_add_tail(&dev->subordinate->node, &dev->bus->children);
spin_unlock(&pci_bus_lock);
if (dev->subordinate) {
if (list_empty(&dev->subordinate->node)) {
spin_lock(&pci_bus_lock);
list_add_tail(&dev->subordinate->node,
&dev->bus->children);
spin_unlock(&pci_bus_lock);
}
pci_bus_add_devices(dev->subordinate);

sysfs_create_link(&dev->subordinate->class_dev.kobj, &dev->dev.kobj, "bridge");
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/pci/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit b4760db

Please sign in to comment.