]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - common/image-fit.c
dm: usb: Split hub detection into its own function
[karo-tx-uboot.git] / common / image-fit.c
index b47d11024f2beb007d049bc0cb54a43268d8bde1..4eb4d42655e9bebb0fae767d89961327a100e0c8 100644 (file)
@@ -16,6 +16,7 @@
 #else
 #include <common.h>
 #include <errno.h>
+#include <mapmem.h>
 #include <asm/io.h>
 DECLARE_GLOBAL_DATA_PTR;
 #endif /* !USE_HOSTCC*/
@@ -1010,9 +1011,7 @@ int fit_image_verify(const void *fit, int image_noffset)
        }
 
        /* Process all hash subnodes of the component image node */
-       for (noffset = fdt_first_subnode(fit, image_noffset);
-            noffset >= 0;
-            noffset = fdt_next_subnode(fit, noffset)) {
+       fdt_for_each_subnode(fit, noffset, image_noffset) {
                const char *name = fit_get_name(fit, noffset, NULL);
 
                /*