fdt_support: Add fdt_for_each_node_by_compatible() helper macro
[platform/kernel/u-boot.git] / drivers / net / fm / fdt.c
index 3855d7d..9828753 100644 (file)
@@ -115,8 +115,7 @@ void fdt_fixup_fman_firmware(void *blob)
        }
 
        /* Find all other Fman nodes and point them to the firmware node. */
-       while ((fmnode = fdt_node_offset_by_compatible(blob, fmnode,
-               "fsl,fman")) > 0) {
+       fdt_for_each_node_by_compatible(fmnode, blob, fmnode, "fsl,fman") {
                rc = fdt_setprop_cell(blob, fmnode, "fsl,firmware-phandle",
                                      phandle);
                if (rc < 0) {