Merge tag 'sound-6.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
[linux-2.6-microblaze.git] / sound / ppc / tumbler.c
index c65e74d..f3f8ad7 100644 (file)
@@ -1060,8 +1060,7 @@ static struct device_node *find_audio_device(const char *name)
        if (! gpiop)
                return NULL;
   
-       for (np = of_get_next_child(gpiop, NULL); np;
-                       np = of_get_next_child(gpiop, np)) {
+       for_each_child_of_node(gpiop, np) {
                const char *property = of_get_property(np, "audio-gpio", NULL);
                if (property && strcmp(property, name) == 0)
                        break;
@@ -1080,8 +1079,7 @@ static struct device_node *find_compatible_audio_device(const char *name)
        if (!gpiop)
                return NULL;
   
-       for (np = of_get_next_child(gpiop, NULL); np;
-                       np = of_get_next_child(gpiop, np)) {
+       for_each_child_of_node(gpiop, np) {
                if (of_device_is_compatible(np, name))
                        break;
        }