aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/rpaphp_pci.c
diff options
context:
space:
mode:
authorlinas@austin.ibm.com <linas@austin.ibm.com>2006-01-12 19:18:26 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-31 21:00:12 -0500
commit01657868be1c21b2b8b0e683ea24bdcc2331d522 (patch)
treedab7eb1073f9a842e558de74beb5ec75e7ced0dc /drivers/pci/hotplug/rpaphp_pci.c
parent53044f357448693f218cc4f053affe92ed414f9d (diff)
[PATCH] powerpc/PCI hotplug: remove rpaphp_find_bus()
The function rpaphp_find_pci_bus() has been migrated to pcibios_find_pci_bus() in arch/powerpc/platforms/pseries/pci_dlpar.c This patch removes the old version. 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.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c
index 396b54b0c847..f16d0f9240ee 100644
--- a/drivers/pci/hotplug/rpaphp_pci.c
+++ b/drivers/pci/hotplug/rpaphp_pci.c
@@ -32,36 +32,6 @@
32#include "../pci.h" /* for pci_add_new_bus */ 32#include "../pci.h" /* for pci_add_new_bus */
33#include "rpaphp.h" 33#include "rpaphp.h"
34 34
35static struct pci_bus *find_bus_among_children(struct pci_bus *bus,
36 struct device_node *dn)
37{
38 struct pci_bus *child = NULL;
39 struct list_head *tmp;
40 struct device_node *busdn;
41
42 busdn = pci_bus_to_OF_node(bus);
43 if (busdn == dn)
44 return bus;
45
46 list_for_each(tmp, &bus->children) {
47 child = find_bus_among_children(pci_bus_b(tmp), dn);
48 if (child)
49 break;
50 }
51 return child;
52}
53
54struct pci_bus *rpaphp_find_pci_bus(struct device_node *dn)
55{
56 struct pci_dn *pdn = dn->data;
57
58 if (!pdn || !pdn->phb || !pdn->phb->bus)
59 return NULL;
60
61 return find_bus_among_children(pdn->phb->bus, dn);
62}
63EXPORT_SYMBOL_GPL(rpaphp_find_pci_bus);
64
65static int rpaphp_get_sensor_state(struct slot *slot, int *state) 35static int rpaphp_get_sensor_state(struct slot *slot, int *state)
66{ 36{
67 int rc; 37 int rc;
@@ -120,7 +90,7 @@ int rpaphp_get_pci_adapter_status(struct slot *slot, int is_init, u8 * value)
120 /* config/unconfig adapter */ 90 /* config/unconfig adapter */
121 *value = slot->state; 91 *value = slot->state;
122 } else { 92 } else {
123 bus = rpaphp_find_pci_bus(slot->dn); 93 bus = pcibios_find_pci_bus(slot->dn);
124 if (bus && !list_empty(&bus->devices)) 94 if (bus && !list_empty(&bus->devices))
125 *value = CONFIGURED; 95 *value = CONFIGURED;
126 else 96 else
@@ -370,7 +340,7 @@ static int setup_pci_slot(struct slot *slot)
370 struct pci_bus *bus; 340 struct pci_bus *bus;
371 341
372 BUG_ON(!dn); 342 BUG_ON(!dn);
373 bus = rpaphp_find_pci_bus(dn); 343 bus = pcibios_find_pci_bus(dn);
374 if (!bus) { 344 if (!bus) {
375 err("%s: no pci_bus for dn %s\n", __FUNCTION__, dn->full_name); 345 err("%s: no pci_bus for dn %s\n", __FUNCTION__, dn->full_name);
376 goto exit_rc; 346 goto exit_rc;