summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/ppc/pmac.c6
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)
return -ENODEV;
if (!sound) {
- sound = of_find_node_by_name(NULL, "sound");
- while (sound && sound->parent != chip->node)
- sound = of_find_node_by_name(sound, "sound");
+ for_each_node_by_name(sound, "sound")
+ if (sound->parent == chip->node)
+ break;
}
if (! sound) {
of_node_put(chip->node);