summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/powermac/udbg_adb.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@linaro.org>2014-06-04 16:42:26 +0100
committerGrant Likely <grant.likely@linaro.org>2014-06-26 17:12:24 +0100
commitccdb8ed3b3c739fe99a6f2f474f7ffad3203485d (patch)
treef556b308a0fb81e00a39155596fab68374159cc5 /arch/powerpc/platforms/powermac/udbg_adb.c
parenta752ee56ad84bf9a35b8323af1ad22b03c1df2c4 (diff)
of: Migrate of_find_node_by_name() users to for_each_node_by_name()
There are a bunch of users open coding the for_each_node_by_name() by calling of_find_node_by_name() directly instead of using the macro. This is getting in the way of some cleanups, and the possibility of removing of_find_node_by_name() entirely. Clean it up so that all the users are consistent. Signed-off-by: Grant Likely <grant.likely@linaro.org> Cc: Rob Herring <robh+dt@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'arch/powerpc/platforms/powermac/udbg_adb.c')
-rw-r--r--arch/powerpc/platforms/powermac/udbg_adb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powermac/udbg_adb.c b/arch/powerpc/platforms/powermac/udbg_adb.c
index 44e0b55a2a02..366bd221edec 100644
--- a/arch/powerpc/platforms/powermac/udbg_adb.c
+++ b/arch/powerpc/platforms/powermac/udbg_adb.c
@@ -191,7 +191,7 @@ int __init udbg_adb_init(int force_btext)
* of type "adb". If not, we return a failure, but we keep the
* bext output set for now
*/
- for (np = NULL; (np = of_find_node_by_name(np, "keyboard")) != NULL;) {
+ for_each_node_by_name(np, "keyboard") {
struct device_node *parent = of_get_parent(np);
int found = (parent && strcmp(parent->type, "adb") == 0);
of_node_put(parent);