summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/sunsu.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-12-05 13:50:43 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-17 16:12:17 +0100
commit778ec49c14018730ec177bdd34b17e15e2e748b8 (patch)
tree874d9d2c0fdaa8b6adb92cf8378413035dc61235 /drivers/tty/serial/sunsu.c
parentd72402145ace0697a6a9e8e75a3de5bf3375f78d (diff)
downloadtalos-obmc-linux-778ec49c14018730ec177bdd34b17e15e2e748b8.tar.gz
talos-obmc-linux-778ec49c14018730ec177bdd34b17e15e2e748b8.zip
tty: Use of_node_name_{eq,prefix} 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. For hvc, the code can also be simplified by using of_stdout pointer instead of searching again for the stdout node. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Slaby <jslaby@suse.com> Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-serial@vger.kernel.org Cc: sparclinux@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Michael Ellerman <mpe@ellerman.id.au> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sunsu.c')
-rw-r--r--drivers/tty/serial/sunsu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/sunsu.c b/drivers/tty/serial/sunsu.c
index 6cf3e9b0728f..8ed60ccd45fb 100644
--- a/drivers/tty/serial/sunsu.c
+++ b/drivers/tty/serial/sunsu.c
@@ -1482,8 +1482,8 @@ static int su_probe(struct platform_device *op)
up->port.ops = &sunsu_pops;
ignore_line = false;
- if (!strcmp(dp->name, "rsc-console") ||
- !strcmp(dp->name, "lom-console"))
+ if (of_node_name_eq(dp, "rsc-console") ||
+ of_node_name_eq(dp, "lom-console"))
ignore_line = true;
sunserial_console_match(SUNSU_CONSOLE(), dp,
OpenPOWER on IntegriCloud