lkml.org 
[lkml]   [2011]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH v2 18/29] parisc/PCI: use pci_create_root_bus() instead of pci_scan_bus_parented()
    From
    Date
    No functional change here; just converting from the deprecated
    pci_scan_bus_parented() to pci_create_root_bus() to make a future
    patch simpler.

    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    ---
    drivers/parisc/dino.c | 24 +++++++++++++-----------
    1 files changed, 13 insertions(+), 11 deletions(-)

    diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c
    index bcd5d54..fba5636 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_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 {
    + dino_dev->hba.hba_bus = bus = pci_create_root_bus(&dev->dev,
    + dino_current_bus, &dino_cfg_ops, NULL, NULL);
    + 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;
    }



    \
     
     \ /
      Last update: 2011-10-14 06:33    [W:2.694 / U:0.968 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site