Skip to content

Commit

Permalink
macintosh: windfarm: Another convert to using %pOFn instead of device…
Browse files Browse the repository at this point in the history
…_node.name

In preparation to remove the node name pointer from struct
device_node, convert printf users to use the %pOFn format specifier.

Convert the open coded iterating thru child nodes to
for_each_child_of_node() while we're here.

Signed-off-by: Rob Herring <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
  • Loading branch information
robherring authored and mpe committed Nov 26, 2018
1 parent e5480bd commit 15b680c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/macintosh/windfarm_fcu_controls.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,18 +425,18 @@ static void wf_fcu_lookup_fans(struct wf_fcu_priv *pv)
{ "CPU B 2", "cpu-fan-b-1", },
{ "CPU B 3", "cpu-fan-c-1", },
};
struct device_node *np = NULL, *fcu = pv->i2c->dev.of_node;
struct device_node *np, *fcu = pv->i2c->dev.of_node;
int i;

DBG("Looking up FCU controls in device-tree...\n");

while ((np = of_get_next_child(fcu, np)) != NULL) {
for_each_child_of_node(fcu, np) {
int id, type = -1;
const char *loc;
const char *name;
const u32 *reg;

DBG(" control: %s, type: %s\n", np->name, np->type);
DBG(" control: %pOFn, type: %s\n", np, of_node_get_device_type(np));

/* Detect control type */
if (!strcmp(np->type, "fan-rpm-control") ||
Expand Down

0 comments on commit 15b680c

Please sign in to comment.