Skip to content

Commit

Permalink
parisc/PCI: dino: use pci_create_bus() instead of pci_scan_bus_parent…
Browse files Browse the repository at this point in the history
…ed()

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>
  • Loading branch information
Bjorn Helgaas authored and Jesse Barnes committed Jan 6, 2012
1 parent 9a45800 commit c4e0657
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions drivers/parisc/dino.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit c4e0657

Please sign in to comment.