summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorQinglang Miao <miaoqinglang@huawei.com>2020-09-16 14:21:38 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-16 13:20:09 +0200
commitcb91e7519d5d81ebbe66f559d13949b1da4537c9 (patch)
tree4285b648d5a5f4fbd30d287f1a18bdc3829944e0 /drivers
parentea4de367e57d53b37ecb32cea3b5c753162b070a (diff)
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@huawei.com> Link: https://lore.kernel.org/r/20200916062138.191188-1-miaoqinglang@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/pmac_zilog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c
index 96e7aa479961..063484b22523 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"))