diff mbox series

[v2,1/3] video: Add VIDEO_FONT_4x6 to Kconfig add fix compile waring

Message ID 20220331100302.23948-1-qianfanguijin@163.com
State Deferred
Delegated to: Tom Rini
Headers show
Series [v2,1/3] video: Add VIDEO_FONT_4x6 to Kconfig add fix compile waring | expand

Commit Message

qianfan March 31, 2022, 10:03 a.m. UTC
From: qianfan Zhao <qianfanguijin@163.com>

CONFIG_VIDEO_FONT_4x6 is referenced in include/video_font.h, but doesn't
has a Kconfig configuration.

Add it.

Signed-off-by: qianfan Zhao <qianfanguijin@163.com>
---
 drivers/video/Kconfig    | 15 +++++++++++++++
 include/video_font_4x6.h |  2 +-
 2 files changed, 16 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index e2cf1e752f..adc620682e 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -138,6 +138,21 @@  config CONSOLE_NORMAL
 	  CONFIG_CONSOLE_ROTATION for that). A built-in 8x16 font is used
 	  for the display.
 
+choice
+	prompt "bitmap video font"
+	default VIDEO_FONT_8X16
+	depends on CONSOLE_NORMAL
+	help
+	  Select the default bitmap font.
+
+config VIDEO_FONT_4X6
+	bool "4x6"
+
+config VIDEO_FONT_8X16
+	bool "8x16"
+
+endchoice
+
 config CONSOLE_ROTATION
 	bool "Support rotated displays"
 	depends on DM_VIDEO
diff --git a/include/video_font_4x6.h b/include/video_font_4x6.h
index c7e6351b64..65dd5e8c1d 100644
--- a/include/video_font_4x6.h
+++ b/include/video_font_4x6.h
@@ -46,7 +46,7 @@  __END__;
 #define VIDEO_FONT_HEIGHT	6
 #define VIDEO_FONT_SIZE		(VIDEO_FONT_CHARS * VIDEO_FONT_HEIGHT)
 
-static unsigned char video_fontdata[VIDEO_FONT_SIZE] = {
+static unsigned char __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = {
 
 	/*{*/
 		/*   Char 0: ' '  */