Merge tag 'pci-v4.16-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
[linux-2.6-block.git] / drivers / pci / hotplug / rpadlpar_core.c
index 1935146e37ad24accce5dcd5293dfbdae4e7da6f..e2356a9c7088a4202a41dd76898751947ff6b62f 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/mutex.h>
 #include <asm/rtas.h>
 #include <asm/vio.h>
+#include <linux/firmware.h>
 
 #include "../pci.h"
 #include "rpaphp.h"
@@ -40,15 +41,14 @@ static struct device_node *find_vio_slot_node(char *drc_name)
 {
        struct device_node *parent = of_find_node_by_name(NULL, "vdevice");
        struct device_node *dn = NULL;
-       char *name;
        int rc;
 
        if (!parent)
                return NULL;
 
        while ((dn = of_get_next_child(parent, dn))) {
-               rc = rpaphp_get_drc_props(dn, NULL, &name, NULL, NULL);
-               if ((rc == 0) && (!strcmp(drc_name, name)))
+               rc = rpaphp_check_drc_props(dn, drc_name, NULL);
+               if (rc == 0)
                        break;
        }
 
@@ -60,15 +60,12 @@ static struct device_node *find_php_slot_pci_node(char *drc_name,
                                                  char *drc_type)
 {
        struct device_node *np = NULL;
-       char *name;
-       char *type;
        int rc;
 
        while ((np = of_find_node_by_name(np, "pci"))) {
-               rc = rpaphp_get_drc_props(np, NULL, &name, &type, NULL);
+               rc = rpaphp_check_drc_props(np, drc_name, drc_type);
                if (rc == 0)
-                       if (!strcmp(drc_name, name) && !strcmp(drc_type, type))
-                               break;
+                       break;
        }
 
        return np;