diff mbox series

[1/1] rpi: Fix build error when CONFIG_VIDEO is disabled for Raspberry Pi

Message ID 20240920063204.1049202-2-martin.stolpe@gmail.com
State New
Delegated to: Peter Robinson
Headers show
Series rpi: Fix compilation when CONFIG_VIDEO is disabled | expand

Commit Message

Martin Stolpe Sept. 20, 2024, 6:32 a.m. UTC
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 <martin.stolpe@gmail.com>
---

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

Patch

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;