summaryrefslogtreecommitdiff
path: root/drivers/sbus/char/flash.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-12-05 22:50:38 +0300
committerDavid S. Miller <davem@davemloft.net>2018-12-06 08:00:02 +0300
commit91abe6b2237f4ff92aec250c7e79765376f17b0b (patch)
tree42be9dc7ab50a09659cc6dc2cef8d5505bf70cc7 /drivers/sbus/char/flash.c
parent726799a4f9192800a6393b92da8d7573d573eb8e (diff)
downloadlinux-91abe6b2237f4ff92aec250c7e79765376f17b0b.tar.xz
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/flash.c')
-rw-r--r--drivers/sbus/char/flash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c
index a610b8d3d11f..515dc1ff1e33 100644
--- a/drivers/sbus/char/flash.c
+++ b/drivers/sbus/char/flash.c
@@ -165,9 +165,9 @@ static int flash_probe(struct platform_device *op)
parent = dp->parent;
- if (strcmp(parent->name, "sbus") &&
- strcmp(parent->name, "sbi") &&
- strcmp(parent->name, "ebus"))
+ if (!of_node_name_eq(parent, "sbus") &&
+ !of_node_name_eq(parent, "sbi") &&
+ !of_node_name_eq(parent, "ebus"))
return -ENODEV;
flash.read_base = op->resource[0].start;