diff options
author | Rob Herring <robh@kernel.org> | 2018-11-16 16:11:02 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-27 08:29:33 +0100 |
commit | 55949c7e75ba535effd6965e47f705f173547dea (patch) | |
tree | 90ccac759cc27e68f5f6ee7f3cd650316c3e299c /drivers/misc | |
parent | 97a64ba77db12e3f33680fc2540453c35b3681f7 (diff) | |
download | linux-55949c7e75ba535effd6965e47f705f173547dea.tar.bz2 |
misc: cxl: Use device_type helpers to access the node type
Remove directly accessing device_node.type pointer and use the accessors
instead. This will eventually allow removing the type pointer.
Cc: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/cxl/pci.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c index b66d832d3233..c79ba1c699ad 100644 --- a/drivers/misc/cxl/pci.c +++ b/drivers/misc/cxl/pci.c @@ -1718,7 +1718,6 @@ int cxl_slot_is_switched(struct pci_dev *dev) { struct device_node *np; int depth = 0; - const __be32 *prop; if (!(np = pci_device_to_OF_node(dev))) { pr_err("cxl: np = NULL\n"); @@ -1727,8 +1726,7 @@ int cxl_slot_is_switched(struct pci_dev *dev) of_node_get(np); while (np) { np = of_get_next_parent(np); - prop = of_get_property(np, "device_type", NULL); - if (!prop || strcmp((char *)prop, "pciex")) + if (!of_node_is_type(np, "pciex")) break; depth++; } |