Merge tag 'irqchip-core-3.18' of git://git.infradead.org/users/jcooper/linux into...
[firefly-linux-kernel-4.4.55.git] / sound / ppc / pmac.c
index 7a43c0c38316c7879815cf42190cd64f51376373..8a431bcb056cecc5414ba30e93c238fce7288df9 100644 (file)
@@ -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);