aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2012-05-17 21:51:12 -0400
committerBjorn Helgaas <bhelgaas@google.com>2012-06-13 17:42:23 -0400
commit857c3b668ae35c48d9d7a4248b6c0bdb65797d0e (patch)
tree7639d3cdd36b976bb4201de202e31f79c8a29c9a /drivers/pci/probe.c
parent67cdc827286366acb6c60c821013c1185ee00b36 (diff)
PCI: add default busn_res for pci_scan_bus()
also do not need to shrink busn_res. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 68e75cb0831b..9f68b9d3597c 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1836,9 +1836,10 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent,
1836 1836
1837 pci_add_resource(&resources, &ioport_resource); 1837 pci_add_resource(&resources, &ioport_resource);
1838 pci_add_resource(&resources, &iomem_resource); 1838 pci_add_resource(&resources, &iomem_resource);
1839 pci_add_resource(&resources, &busn_resource);
1839 b = pci_create_root_bus(parent, bus, ops, sysdata, &resources); 1840 b = pci_create_root_bus(parent, bus, ops, sysdata, &resources);
1840 if (b) 1841 if (b)
1841 b->busn_res.end = pci_scan_child_bus(b); 1842 pci_scan_child_bus(b);
1842 else 1843 else
1843 pci_free_resource_list(&resources); 1844 pci_free_resource_list(&resources);
1844 return b; 1845 return b;
@@ -1853,9 +1854,10 @@ struct pci_bus * __devinit pci_scan_bus(int bus, struct pci_ops *ops,
1853 1854
1854 pci_add_resource(&resources, &ioport_resource); 1855 pci_add_resource(&resources, &ioport_resource);
1855 pci_add_resource(&resources, &iomem_resource); 1856 pci_add_resource(&resources, &iomem_resource);
1857 pci_add_resource(&resources, &busn_resource);
1856 b = pci_create_root_bus(NULL, bus, ops, sysdata, &resources); 1858 b = pci_create_root_bus(NULL, bus, ops, sysdata, &resources);
1857 if (b) { 1859 if (b) {
1858 b->busn_res.end = pci_scan_child_bus(b); 1860 pci_scan_child_bus(b);
1859 pci_bus_add_devices(b); 1861 pci_bus_add_devices(b);
1860 } else { 1862 } else {
1861 pci_free_resource_list(&resources); 1863 pci_free_resource_list(&resources);