diff options
author | Rob Herring <robh@kernel.org> | 2018-12-05 20:50:38 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-06 06:00:02 +0100 |
commit | 91abe6b2237f4ff92aec250c7e79765376f17b0b (patch) | |
tree | 42be9dc7ab50a09659cc6dc2cef8d5505bf70cc7 /drivers/sbus/char/bbc_envctrl.c | |
parent | Merge branch 'sparc-syscall-gen' (diff) | |
download | linux-91abe6b2237f4ff92aec250c7e79765376f17b0b.tar.xz linux-91abe6b2237f4ff92aec250c7e79765376f17b0b.zip |
sbus: Use of_node_name_eq for node name comparisons
Convert string compares of DT node names to use of_node_name_eq helper
instead. This removes direct access to the node name pointer.
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/sbus/char/bbc_envctrl.c')
-rw-r--r-- | drivers/sbus/char/bbc_envctrl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c index fb5bcf6dddc1..4f2dd21e44a0 100644 --- a/drivers/sbus/char/bbc_envctrl.c +++ b/drivers/sbus/char/bbc_envctrl.c @@ -571,9 +571,9 @@ int bbc_envctrl_init(struct bbc_i2c_bus *bp) int devidx = 0; while ((op = bbc_i2c_getdev(bp, devidx++)) != NULL) { - if (!strcmp(op->dev.of_node->name, "temperature")) + if (of_node_name_eq(op->dev.of_node, "temperature")) attach_one_temp(bp, op, temp_index++); - if (!strcmp(op->dev.of_node->name, "fan-control")) + if (of_node_name_eq(op->dev.of_node, "fan-control")) attach_one_fan(bp, op, fan_index++); } if (temp_index != 0 && fan_index != 0) { |