diff options
author | linas@austin.ibm.com <linas@austin.ibm.com> | 2005-12-02 01:59:58 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-09 21:13:18 +0100 |
commit | cd5b50be8d8e8e6170da3a261fc625fd603f9dc4 (patch) | |
tree | ec3c36ffc5a6e90389ba8bd0ef252bb5a058b0af /drivers/pci/hotplug/rpaphp_pci.c | |
parent | [PATCH] PCI Hotplug/powerpc: remove duplicated code (diff) | |
download | linux-cd5b50be8d8e8e6170da3a261fc625fd603f9dc4.tar.xz linux-cd5b50be8d8e8e6170da3a261fc625fd603f9dc4.zip |
[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/rpaphp_pci.c')
-rw-r--r-- | drivers/pci/hotplug/rpaphp_pci.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c index fc2368710cf7..6f21c73be3c0 100644 --- a/drivers/pci/hotplug/rpaphp_pci.c +++ b/drivers/pci/hotplug/rpaphp_pci.c @@ -62,28 +62,6 @@ struct pci_bus *rpaphp_find_pci_bus(struct device_node *dn) } EXPORT_SYMBOL_GPL(rpaphp_find_pci_bus); -int rpaphp_claim_resource(struct pci_dev *dev, int resource) -{ - struct resource *res = &dev->resource[resource]; - struct resource *root = pci_find_parent_resource(dev, res); - char *dtype = resource < PCI_BRIDGE_RESOURCES ? "device" : "bridge"; - int err = -EINVAL; - - if (root != NULL) { - err = request_resource(root, res); - } - - if (err) { - err("PCI: %s region %d of %s %s [%lx:%lx]\n", - root ? "Address space collision on" : - "No parent found for", - resource, dtype, pci_name(dev), res->start, res->end); - } - return err; -} - -EXPORT_SYMBOL_GPL(rpaphp_claim_resource); - static int rpaphp_get_sensor_state(struct slot *slot, int *state) { int rc; @@ -177,7 +155,7 @@ void rpaphp_fixup_new_pci_devices(struct pci_bus *bus, int fix_bus) if (r->parent || !r->start || !r->flags) continue; - rpaphp_claim_resource(dev, i); + pci_claim_resource(dev, i); } } } |