Commit a57ed79e authored by John Rose's avatar John Rose Committed by Greg Kroah-Hartman

PCI: rpaphp: change device tree examination

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: default avatarJohn Rose <johnrose@austin.ibm.com>
Signed-off-by: default avatarKristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ac9e9891
...@@ -63,7 +63,7 @@ static struct device_node *find_php_slot_pci_node(char *drc_name, ...@@ -63,7 +63,7 @@ static struct device_node *find_php_slot_pci_node(char *drc_name,
char *type; char *type;
int rc; 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); rc = rpaphp_get_drc_props(np, NULL, &name, &type, NULL);
if (rc == 0) if (rc == 0)
if (!strcmp(drc_name, name) && !strcmp(drc_type, type)) if (!strcmp(drc_name, name) && !strcmp(drc_type, type))
......
...@@ -356,7 +356,7 @@ static int __init rpaphp_init(void) ...@@ -356,7 +356,7 @@ static int __init rpaphp_init(void)
info(DRIVER_DESC " version: " DRIVER_VERSION "\n"); info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
init_MUTEX(&rpaphp_sem); 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); rpaphp_add_slot(dn);
return 0; return 0;
......
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