Commit d681db4a authored by linas@austin.ibm.com's avatar linas@austin.ibm.com Committed by Greg Kroah-Hartman

[PATCH] PCI Hotplug/powerpc: remove duplicated code

The RPAPHP code contains a routine that duplicates some existing code.
This patch removes the rpaphp version of the code.
Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>
Acked-by: default avatarJohn Rose <johnrose@austin.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 81745512
...@@ -154,7 +154,8 @@ static struct pci_dev *dlpar_pci_add_bus(struct device_node *dn) ...@@ -154,7 +154,8 @@ static struct pci_dev *dlpar_pci_add_bus(struct device_node *dn)
struct pci_controller *phb = pdn->phb; struct pci_controller *phb = pdn->phb;
struct pci_dev *dev = NULL; struct pci_dev *dev = NULL;
rpaphp_eeh_init_nodes(dn); eeh_add_device_tree_early(dn);
/* Add EADS device to PHB bus, adding new entry to bus->devices */ /* Add EADS device to PHB bus, adding new entry to bus->devices */
dev = of_create_pci_dev(dn, phb->bus, pdn->devfn); dev = of_create_pci_dev(dn, phb->bus, pdn->devfn);
if (!dev) { if (!dev) {
......
...@@ -287,18 +287,6 @@ rpaphp_pci_config_slot(struct pci_bus *bus) ...@@ -287,18 +287,6 @@ rpaphp_pci_config_slot(struct pci_bus *bus)
return dev; return dev;
} }
void rpaphp_eeh_init_nodes(struct device_node *dn)
{
struct device_node *sib;
for (sib = dn->child; sib; sib = sib->sibling)
rpaphp_eeh_init_nodes(sib);
eeh_add_device_early(dn);
return;
}
EXPORT_SYMBOL_GPL(rpaphp_eeh_init_nodes);
static void print_slot_pci_funcs(struct pci_bus *bus) static void print_slot_pci_funcs(struct pci_bus *bus)
{ {
struct device_node *dn; struct device_node *dn;
...@@ -324,7 +312,7 @@ int rpaphp_config_pci_adapter(struct pci_bus *bus) ...@@ -324,7 +312,7 @@ int rpaphp_config_pci_adapter(struct pci_bus *bus)
if (!dn) if (!dn)
goto exit; goto exit;
rpaphp_eeh_init_nodes(dn); eeh_add_device_tree_early(dn);
dev = rpaphp_pci_config_slot(bus); dev = rpaphp_pci_config_slot(bus);
if (!dev) { if (!dev) {
err("%s: can't find any devices.\n", __FUNCTION__); err("%s: can't find any devices.\n", __FUNCTION__);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment