diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2011-10-28 18:26:00 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2012-01-06 15:10:54 -0500 |
commit | 1e39ae9f9035ee02e014b5fe29461674fe19624d (patch) | |
tree | 001fabe45ba74c019c99dca798260792a4400841 /drivers/pci/probe.c | |
parent | de4b2f76d69673cea08be952dcb4df2f4c81c6e3 (diff) |
PCI: convert pci_scan_bus_parented() to use pci_create_root_bus()
This converts pci_scan_bus_parented() to use pci_create_root_bus()
instead of pci_create_bus(). The new bus still has the default (incorrect)
resources, so this patch doesn't help fix that problem, but it does remove
one more use of pci_create_bus().
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index d09644b52d1c..04c2dc709276 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -1640,11 +1640,16 @@ struct pci_bus *pci_create_bus(struct device *parent, | |||
1640 | struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, | 1640 | struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, |
1641 | int bus, struct pci_ops *ops, void *sysdata) | 1641 | int bus, struct pci_ops *ops, void *sysdata) |
1642 | { | 1642 | { |
1643 | LIST_HEAD(resources); | ||
1643 | struct pci_bus *b; | 1644 | struct pci_bus *b; |
1644 | 1645 | ||
1645 | b = pci_create_bus(parent, bus, ops, sysdata); | 1646 | pci_add_resource(&resources, &ioport_resource); |
1647 | pci_add_resource(&resources, &iomem_resource); | ||
1648 | b = pci_create_root_bus(parent, bus, ops, sysdata, &resources); | ||
1646 | if (b) | 1649 | if (b) |
1647 | b->subordinate = pci_scan_child_bus(b); | 1650 | b->subordinate = pci_scan_child_bus(b); |
1651 | else | ||
1652 | pci_free_resource_list(&resources); | ||
1648 | return b; | 1653 | return b; |
1649 | } | 1654 | } |
1650 | EXPORT_SYMBOL(pci_scan_bus_parented); | 1655 | EXPORT_SYMBOL(pci_scan_bus_parented); |