diff options
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index b494066ef32f..43ece5d41d36 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -673,6 +673,8 @@ add_dev: | |||
673 | ret = device_register(&child->dev); | 673 | ret = device_register(&child->dev); |
674 | WARN_ON(ret < 0); | 674 | WARN_ON(ret < 0); |
675 | 675 | ||
676 | pcibios_add_bus(child); | ||
677 | |||
676 | /* Create legacy_io and legacy_mem files for this bus */ | 678 | /* Create legacy_io and legacy_mem files for this bus */ |
677 | pci_create_legacy_files(child); | 679 | pci_create_legacy_files(child); |
678 | 680 | ||
@@ -1627,8 +1629,7 @@ unsigned int pci_scan_child_bus(struct pci_bus *bus) | |||
1627 | if (!bus->is_added) { | 1629 | if (!bus->is_added) { |
1628 | dev_dbg(&bus->dev, "fixups for bus\n"); | 1630 | dev_dbg(&bus->dev, "fixups for bus\n"); |
1629 | pcibios_fixup_bus(bus); | 1631 | pcibios_fixup_bus(bus); |
1630 | if (pci_is_root_bus(bus)) | 1632 | bus->is_added = 1; |
1631 | bus->is_added = 1; | ||
1632 | } | 1633 | } |
1633 | 1634 | ||
1634 | for (pass=0; pass < 2; pass++) | 1635 | for (pass=0; pass < 2; pass++) |
@@ -1661,6 +1662,14 @@ int __weak pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) | |||
1661 | return 0; | 1662 | return 0; |
1662 | } | 1663 | } |
1663 | 1664 | ||
1665 | void __weak pcibios_add_bus(struct pci_bus *bus) | ||
1666 | { | ||
1667 | } | ||
1668 | |||
1669 | void __weak pcibios_remove_bus(struct pci_bus *bus) | ||
1670 | { | ||
1671 | } | ||
1672 | |||
1664 | struct pci_bus *pci_create_root_bus(struct device *parent, int bus, | 1673 | struct pci_bus *pci_create_root_bus(struct device *parent, int bus, |
1665 | struct pci_ops *ops, void *sysdata, struct list_head *resources) | 1674 | struct pci_ops *ops, void *sysdata, struct list_head *resources) |
1666 | { | 1675 | { |
@@ -1715,6 +1724,8 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus, | |||
1715 | if (error) | 1724 | if (error) |
1716 | goto class_dev_reg_err; | 1725 | goto class_dev_reg_err; |
1717 | 1726 | ||
1727 | pcibios_add_bus(b); | ||
1728 | |||
1718 | /* Create legacy_io and legacy_mem files for this bus */ | 1729 | /* Create legacy_io and legacy_mem files for this bus */ |
1719 | pci_create_legacy_files(b); | 1730 | pci_create_legacy_files(b); |
1720 | 1731 | ||