Skip to content

Commit

Permalink
PCI: rpaphp: change device tree examination
Browse files Browse the repository at this point in the history
Change the criterion that RPA PCI Hotplug and RPA DLPAR use when
determining the hotplug capabilities of a given device node.  The
"device_type" property is less consistent than "name" across PCI nodes
on newer hardware.

Signed-off-by: John Rose <johnrose@austin.ibm.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
John Rose authored and Greg Kroah-Hartman committed Dec 1, 2006
1 parent ac9e989 commit a57ed79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/pci/hotplug/rpadlpar_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static struct device_node *find_php_slot_pci_node(char *drc_name,
char *type;
int rc;

while ((np = of_find_node_by_type(np, "pci"))) {
while ((np = of_find_node_by_name(np, "pci"))) {
rc = rpaphp_get_drc_props(np, NULL, &name, &type, NULL);
if (rc == 0)
if (!strcmp(drc_name, name) && !strcmp(drc_type, type))
Expand Down
2 changes: 1 addition & 1 deletion drivers/pci/hotplug/rpaphp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ static int __init rpaphp_init(void)
info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
init_MUTEX(&rpaphp_sem);

while ((dn = of_find_node_by_type(dn, "pci")))
while ((dn = of_find_node_by_name(dn, "pci")))
rpaphp_add_slot(dn);

return 0;
Expand Down

0 comments on commit a57ed79

Please sign in to comment.