diff options
author | linas@austin.ibm.com <linas@austin.ibm.com> | 2005-12-01 18:59:58 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-09 12:13:18 -0800 |
commit | cd5b50be8d8e8e6170da3a261fc625fd603f9dc4 (patch) | |
tree | ec3c36ffc5a6e90389ba8bd0ef252bb5a058b0af /drivers/pci/hotplug/rpadlpar_core.c | |
parent | d681db4aed4453c7d34adfbb64956271186514e9 (diff) | |
download | kernel_samsung_smdk4412-cd5b50be8d8e8e6170da3a261fc625fd603f9dc4.zip kernel_samsung_smdk4412-cd5b50be8d8e8e6170da3a261fc625fd603f9dc4.tar.gz kernel_samsung_smdk4412-cd5b50be8d8e8e6170da3a261fc625fd603f9dc4.tar.bz2 |
[PATCH] PCI Hotplug/powerpc: more removal of duplicated code
The RPAPHP code contains two routines that appear to be gratuitous copies
of very similar pci code. In particular,
rpaphp_claim_resource ~~ pci_claim_resource
(there is a minor, non-functional difference)
rpadlpar_claim_one_bus == pcibios_claim_one_bus
(the code is identical)
This patch removes the rpaphp versions of the code.
Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Acked-by: John Rose <johnrose@austin.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/rpadlpar_core.c')
-rw-r--r-- | drivers/pci/hotplug/rpadlpar_core.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c index 0173641..7d93dba 100644 --- a/drivers/pci/hotplug/rpadlpar_core.c +++ b/drivers/pci/hotplug/rpadlpar_core.c @@ -112,28 +112,6 @@ static struct slot *find_slot(struct device_node *dn) return NULL; } -static void rpadlpar_claim_one_bus(struct pci_bus *b) -{ - struct list_head *ld; - struct pci_bus *child_bus; - - for (ld = b->devices.next; ld != &b->devices; ld = ld->next) { - struct pci_dev *dev = pci_dev_b(ld); - int i; - - for (i = 0; i < PCI_NUM_RESOURCES; i++) { - struct resource *r = &dev->resource[i]; - - if (r->parent || !r->start || !r->flags) - continue; - rpaphp_claim_resource(dev, i); - } - } - - list_for_each_entry(child_bus, &b->children, node) - rpadlpar_claim_one_bus(child_bus); -} - static struct pci_dev *dlpar_find_new_dev(struct pci_bus *parent, struct device_node *dev_dn) { @@ -171,7 +149,7 @@ static struct pci_dev *dlpar_pci_add_bus(struct device_node *dn) rpaphp_init_new_devs(dev->subordinate); /* Claim new bus resources */ - rpadlpar_claim_one_bus(dev->bus); + pcibios_claim_one_bus(dev->bus); /* ioremap() for child bus, which may or may not succeed */ (void) remap_bus_range(dev->bus); |