]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
parisc/PCI: dino: use pci_create_bus() instead of pci_scan_bus_parented()
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 28 Oct 2011 22:27:07 +0000 (16:27 -0600)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 13 Dec 2011 18:42:22 +0000 (10:42 -0800)
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>
drivers/parisc/dino.c

index bcd5d54b7d4d2b3cfc938acf6141cc65bb4ec8ec..90252c016a081439be3439e1a68fa46fd8bebd53 100644 (file)
@@ -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;
 }