When the CONFIG_VIDEO option is set to disabled for Raspberry Pi devices
the build will fail with the following error message:
"undefined reference to `fdt_simplefb_enable_and_mem_rsv'."

Signed-off-by: Martin Stolpe <[email protected]>
---

 board/raspberrypi/rpi/rpi.c | 2 +-
 boot/fdt_simplefb.c         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index ab5ea85cf9..bc49708f85 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -572,7 +572,7 @@ int ft_board_setup(void *blob, struct bd_info *bd)
        node = fdt_node_offset_by_compatible(blob, -1, "simple-framebuffer");
        if (node < 0)
                fdt_simplefb_add_node(blob);
-       else
+       else if (IS_ENABLED(CONFIG_VIDEO))
                fdt_simplefb_enable_and_mem_rsv(blob);
 
 #ifdef CONFIG_EFI_LOADER
diff --git a/boot/fdt_simplefb.c b/boot/fdt_simplefb.c
index 5341554845..b6e916ff7d 100644
--- a/boot/fdt_simplefb.c
+++ b/boot/fdt_simplefb.c
@@ -86,6 +86,7 @@ int fdt_simplefb_add_node(void *blob)
        return fdt_simplefb_configure_node(blob, off);
 }
 
+#if IS_ENABLED(CONFIG_VIDEO)
 /**
  * fdt_simplefb_enable_existing_node() - enable simple-framebuffer DT node
  *
@@ -103,7 +104,6 @@ static int fdt_simplefb_enable_existing_node(void *blob)
        return fdt_simplefb_configure_node(blob, off);
 }
 
-#if IS_ENABLED(CONFIG_VIDEO)
 int fdt_simplefb_enable_and_mem_rsv(void *blob)
 {
        int ret;
-- 
2.43.0

Reply via email to