diff options
author | Grant Likely <grant.likely@linaro.org> | 2014-06-04 11:42:26 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2014-06-26 12:12:24 -0400 |
commit | ccdb8ed3b3c739fe99a6f2f474f7ffad3203485d (patch) | |
tree | f556b308a0fb81e00a39155596fab68374159cc5 /sound | |
parent | a752ee56ad84bf9a35b8323af1ad22b03c1df2c4 (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 'sound')
-rw-r--r-- | sound/ppc/pmac.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c index 7a43c0c38316..8a431bcb056c 100644 --- a/sound/ppc/pmac.c +++ b/sound/ppc/pmac.c | |||
@@ -992,9 +992,9 @@ static int snd_pmac_detect(struct snd_pmac *chip) | |||
992 | return -ENODEV; | 992 | return -ENODEV; |
993 | 993 | ||
994 | if (!sound) { | 994 | if (!sound) { |
995 | sound = of_find_node_by_name(NULL, "sound"); | 995 | for_each_node_by_name(sound, "sound") |
996 | while (sound && sound->parent != chip->node) | 996 | if (sound->parent == chip->node) |
997 | sound = of_find_node_by_name(sound, "sound"); | 997 | break; |
998 | } | 998 | } |
999 | if (! sound) { | 999 | if (! sound) { |
1000 | of_node_put(chip->node); | 1000 | of_node_put(chip->node); |