Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3844
b: refs/heads/master
c: e4ea9bb
h: refs/heads/master
v: v3
  • Loading branch information
Rajesh Shah authored and Greg Kroah-Hartman committed Jun 28, 2005
1 parent c6a9a17 commit 5c64e3a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 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: cc57450f5c044270d2cf1dd437c1850422262109
refs/heads/master: e4ea9bb7e9f177e03a917b1f1213de0315f819ee
11 changes: 10 additions & 1 deletion trunk/drivers/pci/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,11 @@ struct pci_bus * __devinit pci_add_new_bus(struct pci_bus *parent, struct pci_de
struct pci_bus *child;

child = pci_alloc_child_bus(parent, dev, busnr);
if (child)
if (child) {
spin_lock(&pci_bus_lock);
list_add_tail(&child->node, &parent->children);
spin_unlock(&pci_bus_lock);
}
return child;
}

Expand Down Expand Up @@ -765,7 +768,9 @@ pci_scan_single_device(struct pci_bus *bus, int devfn)
* and the bus list for fixup functions, etc.
*/
INIT_LIST_HEAD(&dev->global_list);
spin_lock(&pci_bus_lock);
list_add_tail(&dev->bus_list, &bus->devices);
spin_unlock(&pci_bus_lock);

return dev;
}
Expand Down Expand Up @@ -886,7 +891,9 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus,
pr_debug("PCI: Bus %04x:%02x already known\n", pci_domain_nr(b), bus);
goto err_out;
}
spin_lock(&pci_bus_lock);
list_add_tail(&b->node, &pci_root_buses);
spin_unlock(&pci_bus_lock);

memset(dev, 0, sizeof(*dev));
dev->parent = parent;
Expand Down Expand Up @@ -928,7 +935,9 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus,
class_dev_reg_err:
device_unregister(dev);
dev_reg_err:
spin_lock(&pci_bus_lock);
list_del(&b->node);
spin_unlock(&pci_bus_lock);
err_out:
kfree(dev);
kfree(b);
Expand Down

0 comments on commit 5c64e3a

Please sign in to comment.