diff options
Diffstat (limited to 'sound/ppc/pmac.c')
-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); |