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>
This commit is contained in:

committed by
Michael Ellerman

parent
15b680c474
commit
bf82d3758d
@@ -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)
|
||||
|
Reference in New Issue
Block a user