From kristen.c.accardi@intel.com Mon Nov 13 15:13:10 2006 Date: Mon, 13 Nov 2006 15:12:52 -0800 From: John Rose To: gregkh@suse.de Cc: John Rose , Kristen Carlson Accardi Subject: PCI: rpaphp: change device tree examination Message-Id: <20061113151252.f8b1713f.kristen.c.accardi@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII From: John Rose 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 Signed-off-by: Kristen Carlson Accardi Signed-off-by: Greg Kroah-Hartman --- drivers/pci/hotplug/rpadlpar_core.c | 2 +- drivers/pci/hotplug/rpaphp_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- gregkh-2.6.orig/drivers/pci/hotplug/rpadlpar_core.c +++ gregkh-2.6/drivers/pci/hotplug/rpadlpar_core.c @@ -63,7 +63,7 @@ static struct device_node *find_php_slot 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)) --- gregkh-2.6.orig/drivers/pci/hotplug/rpaphp_core.c +++ gregkh-2.6/drivers/pci/hotplug/rpaphp_core.c @@ -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;