Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127383
b: refs/heads/master
c: 3789fa8
h: refs/heads/master
i:
  127381: 9edd81a
  127379: f9ed7e3
  127375: 9d58c2e
v: v3
  • Loading branch information
Yu Zhao authored and Jesse Barnes committed Jan 7, 2009
1 parent 4d73752 commit 22b6b0e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: 0b400c7ed4d027e02f6231afa39852a2d48e6f25
refs/heads/master: 3789fa8a2e534523c896a32a9f27f78d52ad7d82
8 changes: 6 additions & 2 deletions trunk/drivers/pci/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,10 @@ static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent,
if (!child)
return NULL;

child->self = bridge;
child->parent = parent;
child->ops = parent->ops;
child->sysdata = parent->sysdata;
child->bus_flags = parent->bus_flags;
child->bridge = get_device(&bridge->dev);

/* initialize some portions of the bus device, but don't register it
* now as the parent is not properly set up yet. This device will get
Expand All @@ -420,6 +418,12 @@ static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent,
child->primary = parent->secondary;
child->subordinate = 0xff;

if (!bridge)
return child;

child->self = bridge;
child->bridge = get_device(&bridge->dev);

/* Set up default resource pointers and names.. */
for (i = 0; i < PCI_BRIDGE_RESOURCE_NUM; i++) {
child->resource[i] = &bridge->resource[PCI_BRIDGE_RESOURCES+i];
Expand Down

0 comments on commit 22b6b0e

Please sign in to comment.