* [PATCH] ALSA: sparc: Use of_node_name_eq for node name comparisons
@ 2018-12-05 19:50 Rob Herring
0 siblings, 0 replies; only message in thread
From: Rob Herring @ 2018-12-05 19:50 UTC (permalink / raw)
To: devicetree, linux-kernel; +Cc: David S. Miller, sparclinux
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>
---
sound/sparc/cs4231.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
index e73c962590eb..f707cd4886c3 100644
--- a/sound/sparc/cs4231.c
+++ b/sound/sparc/cs4231.c
@@ -2075,12 +2075,12 @@ static int cs4231_ebus_probe(struct platform_device *op)
static int cs4231_probe(struct platform_device *op)
{
#ifdef EBUS_SUPPORT
- if (!strcmp(op->dev.of_node->parent->name, "ebus"))
+ if (of_node_name_eq(op->dev.of_node->parent, "ebus"))
return cs4231_ebus_probe(op);
#endif
#ifdef SBUS_SUPPORT
- if (!strcmp(op->dev.of_node->parent->name, "sbus") ||
- !strcmp(op->dev.of_node->parent->name, "sbi"))
+ if (of_node_name_eq(op->dev.of_node->parent, "sbus") ||
+ of_node_name_eq(op->dev.of_node->parent, "sbi"))
return cs4231_sbus_probe(op);
#endif
return -ENODEV;
--
2.19.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-12-05 19:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-05 19:50 [PATCH] ALSA: sparc: Use of_node_name_eq for node name comparisons Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).