diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2011-10-28 16:27:07 -0600 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2012-01-06 12:11:04 -0800 |
commit | c4e06576282c5f91549b344fd0f516c421332b68 (patch) | |
tree | 0618d1d70d83ba603c601c098b8395951334f0b7 /drivers/parisc | |
parent | 9a4580011da2a2a1a5a152e13dce2a32997d3ee9 (diff) | |
download | linux-rpi3-c4e06576282c5f91549b344fd0f516c421332b68.tar.gz linux-rpi3-c4e06576282c5f91549b344fd0f516c421332b68.tar.bz2 linux-rpi3-c4e06576282c5f91549b344fd0f516c421332b68.zip |
parisc/PCI: dino: use pci_create_bus() instead of pci_scan_bus_parented()
No functional change here; just converting from pci_scan_bus_parented()
to pci_create_bus() to make a future patch simpler.
CC: linux-parisc@vger.kernel.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/parisc')
-rw-r--r-- | drivers/parisc/dino.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c index bcd5d54b7d4d..90252c016a08 100644 --- a/drivers/parisc/dino.c +++ b/drivers/parisc/dino.c @@ -1007,22 +1007,24 @@ static int __init dino_probe(struct parisc_device *dev) ** It's not used to avoid chicken/egg problems ** with configuration accessor functions. */ - dino_dev->hba.hba_bus = bus = pci_scan_bus_parented(&dev->dev, + dino_dev->hba.hba_bus = bus = pci_create_bus(&dev->dev, dino_current_bus, &dino_cfg_ops, NULL); - - if(bus) { - /* This code *depends* on scanning being single threaded - * if it isn't, this global bus number count will fail - */ - dino_current_bus = bus->subordinate + 1; - pci_bus_assign_resources(bus); - pci_bus_add_devices(bus); - } else { + if (!bus) { printk(KERN_ERR "ERROR: failed to scan PCI bus on %s (duplicate bus number %d?)\n", dev_name(&dev->dev), dino_current_bus); /* increment the bus number in case of duplicates */ dino_current_bus++; + return 0; } + + bus->subordinate = pci_scan_child_bus(bus); + + /* This code *depends* on scanning being single threaded + * if it isn't, this global bus number count will fail + */ + dino_current_bus = bus->subordinate + 1; + pci_bus_assign_resources(bus); + pci_bus_add_devices(bus); return 0; } |