aboutsummaryrefslogtreecommitdiff
path: root/drivers/video/meson/simplefb_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/meson/simplefb_common.c')
-rw-r--r--drivers/video/meson/simplefb_common.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/video/meson/simplefb_common.c b/drivers/video/meson/simplefb_common.c
index 81782326d46..c8b5af501de 100644
--- a/drivers/video/meson/simplefb_common.c
+++ b/drivers/video/meson/simplefb_common.c
@@ -7,22 +7,19 @@
* (C) Copyright 2017 Icenowy Zheng <icenowy@aosc.io>
*/
-#include <fdtdec.h>
+#include <fdt_support.h>
int meson_simplefb_fdt_match(void *blob, const char *pipeline)
{
int offset, ret;
/* Find a prefilled simpefb node, matching out pipeline config */
- offset = fdt_node_offset_by_compatible(blob, -1,
- "amlogic,simple-framebuffer");
- while (offset >= 0) {
+ fdt_for_each_node_by_compatible(offset, blob, -1,
+ "amlogic,simple-framebuffer") {
ret = fdt_stringlist_search(blob, offset, "amlogic,pipeline",
pipeline);
if (ret == 0)
break;
- offset = fdt_node_offset_by_compatible(blob, offset,
- "amlogic,simple-framebuffer");
}
return offset;