diff options
| author | linas@austin.ibm.com <linas@austin.ibm.com> | 2006-01-12 19:18:26 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-31 21:00:12 -0500 |
| commit | 01657868be1c21b2b8b0e683ea24bdcc2331d522 (patch) | |
| tree | dab7eb1073f9a842e558de74beb5ec75e7ced0dc | |
| parent | 53044f357448693f218cc4f053affe92ed414f9d (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>
| -rw-r--r-- | drivers/pci/hotplug/rpadlpar_core.c | 6 | ||||
| -rw-r--r-- | drivers/pci/hotplug/rpaphp.h | 3 | ||||
| -rw-r--r-- | drivers/pci/hotplug/rpaphp_pci.c | 34 |
3 files changed, 5 insertions, 38 deletions
diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c index 7f504b380f26..bc17a13fc82e 100644 --- a/drivers/pci/hotplug/rpadlpar_core.c +++ b/drivers/pci/hotplug/rpadlpar_core.c | |||
| @@ -174,7 +174,7 @@ static int dlpar_add_pci_slot(char *drc_name, struct device_node *dn) | |||
| 174 | { | 174 | { |
| 175 | struct pci_dev *dev; | 175 | struct pci_dev *dev; |
| 176 | 176 | ||
| 177 | if (rpaphp_find_pci_bus(dn)) | 177 | if (pcibios_find_pci_bus(dn)) |
| 178 | return -EINVAL; | 178 | return -EINVAL; |
| 179 | 179 | ||
| 180 | /* Add pci bus */ | 180 | /* Add pci bus */ |
| @@ -221,7 +221,7 @@ static int dlpar_remove_phb(char *drc_name, struct device_node *dn) | |||
| 221 | struct pci_dn *pdn; | 221 | struct pci_dn *pdn; |
| 222 | int rc = 0; | 222 | int rc = 0; |
| 223 | 223 | ||
| 224 | if (!rpaphp_find_pci_bus(dn)) | 224 | if (!pcibios_find_pci_bus(dn)) |
| 225 | return -EINVAL; | 225 | return -EINVAL; |
| 226 | 226 | ||
| 227 | slot = find_slot(dn); | 227 | slot = find_slot(dn); |
| @@ -366,7 +366,7 @@ int dlpar_remove_pci_slot(char *drc_name, struct device_node *dn) | |||
| 366 | struct pci_bus *bus; | 366 | struct pci_bus *bus; |
| 367 | struct slot *slot; | 367 | struct slot *slot; |
| 368 | 368 | ||
| 369 | bus = rpaphp_find_pci_bus(dn); | 369 | bus = pcibios_find_pci_bus(dn); |
| 370 | if (!bus) | 370 | if (!bus) |
| 371 | return -EINVAL; | 371 | return -EINVAL; |
| 372 | 372 | ||
diff --git a/drivers/pci/hotplug/rpaphp.h b/drivers/pci/hotplug/rpaphp.h index 57ea71a7bda5..b333a35dd221 100644 --- a/drivers/pci/hotplug/rpaphp.h +++ b/drivers/pci/hotplug/rpaphp.h | |||
| @@ -88,13 +88,10 @@ extern int num_slots; | |||
| 88 | /* function prototypes */ | 88 | /* function prototypes */ |
| 89 | 89 | ||
| 90 | /* rpaphp_pci.c */ | 90 | /* rpaphp_pci.c */ |
| 91 | extern struct pci_bus *rpaphp_find_pci_bus(struct device_node *dn); | ||
| 92 | extern int rpaphp_claim_resource(struct pci_dev *dev, int resource); | ||
| 93 | extern int rpaphp_enable_pci_slot(struct slot *slot); | 91 | extern int rpaphp_enable_pci_slot(struct slot *slot); |
| 94 | extern int register_pci_slot(struct slot *slot); | 92 | extern int register_pci_slot(struct slot *slot); |
| 95 | extern int rpaphp_get_pci_adapter_status(struct slot *slot, int is_init, u8 * value); | 93 | extern int rpaphp_get_pci_adapter_status(struct slot *slot, int is_init, u8 * value); |
| 96 | extern void rpaphp_init_new_devs(struct pci_bus *bus); | 94 | extern void rpaphp_init_new_devs(struct pci_bus *bus); |
| 97 | extern void rpaphp_eeh_init_nodes(struct device_node *dn); | ||
| 98 | 95 | ||
| 99 | extern int rpaphp_config_pci_adapter(struct pci_bus *bus); | 96 | extern int rpaphp_config_pci_adapter(struct pci_bus *bus); |
| 100 | extern int rpaphp_unconfig_pci_adapter(struct pci_bus *bus); | 97 | extern int rpaphp_unconfig_pci_adapter(struct pci_bus *bus); |
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 | ||
| 35 | static 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 | |||
| 54 | struct 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 | } | ||
| 63 | EXPORT_SYMBOL_GPL(rpaphp_find_pci_bus); | ||
| 64 | |||
| 65 | static int rpaphp_get_sensor_state(struct slot *slot, int *state) | 35 | static 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; |
