summaryrefslogtreecommitdiff
path: root/drivers/misc/cxl
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-11-17 01:11:02 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2018-11-26 14:33:37 +0300
commitd2db097905d6ec439b7e863dc9a7e790889a7607 (patch)
tree1e3870835271d72dddb35bdad1b9cb0a8578303b /drivers/misc/cxl
parentbf82d3758d4a075d17f4930c9872b05bd277ab0c (diff)
downloadlinux-d2db097905d6ec439b7e863dc9a7e790889a7607.tar.xz
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. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/misc/cxl')
-rw-r--r--drivers/misc/cxl/pci.c4
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++;
}