[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200916062138.191188-1-miaoqinglang@huawei.com>
Date: Wed, 16 Sep 2020 14:21:38 +0800
From: Qinglang Miao <miaoqinglang@...wei.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
Michael Ellerman <mpe@...erman.id.au>,
"Benjamin Herrenschmidt" <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>
CC: <linux-serial@...r.kernel.org>, <linuxppc-dev@...ts.ozlabs.org>,
<linux-kernel@...r.kernel.org>,
Qinglang Miao <miaoqinglang@...wei.com>
Subject: [PATCH -next] serial: pmac_zilog: use for_each_child_of_node() macro
Use for_each_child_of_node() macro instead of open coding it.
Signed-off-by: Qinglang Miao <miaoqinglang@...wei.com>
---
drivers/tty/serial/pmac_zilog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c
index 96e7aa479..063484b22 100644
--- a/drivers/tty/serial/pmac_zilog.c
+++ b/drivers/tty/serial/pmac_zilog.c
@@ -1644,7 +1644,7 @@ static int __init pmz_probe(void)
* TODO: Add routines with proper locking to do that...
*/
node_a = node_b = NULL;
- for (np = NULL; (np = of_get_next_child(node_p, np)) != NULL;) {
+ for_each_child_of_node(node_p, np) {
if (of_node_name_prefix(np, "ch-a"))
node_a = of_node_get(np);
else if (of_node_name_prefix(np, "ch-b"))
--
2.23.0
Powered by blists - more mailing lists