hc
2023-12-11 1f93a7dfd1f8d5ff7a5c53246c7534fe2332d6f4
kernel/arch/powerpc/platforms/powermac/udbg_scc.c
....@@ -1,12 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * udbg for zilog scc ports as found on Apple PowerMacs
34 *
45 * Copyright (C) 2001-2005 PPC 64 Team, IBM Corp
5
- *
6
- * This program is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU General Public License
8
- * as published by the Free Software Foundation; either version
9
- * 2 of the License, or (at your option) any later version.
106 */
117 #include <linux/types.h>
128 #include <asm/udbg.h>
....@@ -84,10 +80,10 @@
8480 path = of_get_property(of_chosen, "linux,stdout-path", NULL);
8581 if (path != NULL)
8682 stdout = of_find_node_by_path(path);
87
- for (ch = NULL; (ch = of_get_next_child(escc, ch)) != NULL;) {
83
+ for_each_child_of_node(escc, ch) {
8884 if (ch == stdout)
8985 ch_def = of_node_get(ch);
90
- if (strcmp(ch->name, "ch-a") == 0)
86
+ if (of_node_name_eq(ch, "ch-a"))
9187 ch_a = of_node_get(ch);
9288 }
9389 if (ch_def == NULL && !force_scc)