PCI: rpaphp: change device tree examination
authorJohn Rose <johnrose@austin.ibm.com>
Mon, 13 Nov 2006 23:12:52 +0000 (15:12 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Dec 2006 22:36:59 +0000 (14:36 -0800)
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>
drivers/pci/hotplug/rpadlpar_core.c
drivers/pci/hotplug/rpaphp_core.c

index 46825fee3ae456f1bc47ed5dec4d9fc88437c234..72383467a0d5a5cbb9a60e0bdc4f04b0904f5172 100644 (file)
@@ -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))
index 141486df235b6ec8ef60908086661778f031c3c3..71a2cb8baa4aaa2f1297cb0fd76f689e0b66c84f 100644 (file)
@@ -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;