summaryrefslogtreecommitdiff
path: root/drivers/macintosh/windfarm_fcu_controls.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-11-16 16:11:01 -0600
committerMichael Ellerman <mpe@ellerman.id.au>2018-11-26 22:33:37 +1100
commitbf82d3758d4a075d17f4930c9872b05bd277ab0c (patch)
tree4d4d33f42e137a3a0601f9f3991d3c509d1cf3cd /drivers/macintosh/windfarm_fcu_controls.c
parent15b680c474afd54dac05530d8fed41c1e8d607e0 (diff)
macintosh: 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> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/macintosh/windfarm_fcu_controls.c')
-rw-r--r--drivers/macintosh/windfarm_fcu_controls.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/macintosh/windfarm_fcu_controls.c b/drivers/macintosh/windfarm_fcu_controls.c
index 2b3ca628a650..629f19875d7f 100644
--- a/drivers/macintosh/windfarm_fcu_controls.c
+++ b/drivers/macintosh/windfarm_fcu_controls.c
@@ -439,11 +439,11 @@ static void wf_fcu_lookup_fans(struct wf_fcu_priv *pv)
DBG(" control: %pOFn, type: %s\n", np, of_node_get_device_type(np));
/* Detect control type */
- if (!strcmp(np->type, "fan-rpm-control") ||
- !strcmp(np->type, "fan-rpm"))
+ if (of_node_is_type(np, "fan-rpm-control") ||
+ of_node_is_type(np, "fan-rpm"))
type = FCU_FAN_RPM;
- if (!strcmp(np->type, "fan-pwm-control") ||
- !strcmp(np->type, "fan-pwm"))
+ if (of_node_is_type(np, "fan-pwm-control") ||
+ of_node_is_type(np, "fan-pwm"))
type = FCU_FAN_PWM;
/* Only care about fans for now */
if (type == -1)