From 105438200744ca81199606a7b62c9eb07ac6efbd Mon Sep 17 00:00:00 2001 From: Anatolij Gustschin Date: Sat, 1 May 2010 22:21:09 +0200 Subject: video: cfb_console: add weak default video_set_lut() Do not enforce drivers to provide empty video_set_lut() if they do not implement indexed color (8 bpp) frame buffer support. Add default function to the cfb_console driver and remove empty video_set_lut() functions. Signed-off-by: Anatolij Gustschin --- drivers/video/cfb_console.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'drivers/video/cfb_console.c') diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index d1f47c9157..96d52fbaea 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -749,6 +749,18 @@ void video_puts (const char *s) /*****************************************************************************/ +/* + * Do not enforce drivers (or board code) to provide empty + * video_set_lut() if they do not support 8 bpp format. + * Implement weak default function instead. + */ +void __video_set_lut (unsigned int index, unsigned char r, + unsigned char g, unsigned char b) +{ +} +void video_set_lut (unsigned int, unsigned char, unsigned char, unsigned char) + __attribute__((weak, alias("__video_set_lut"))); + #if defined(CONFIG_CMD_BMP) || defined(CONFIG_SPLASH_SCREEN) #define FILL_8BIT_332RGB(r,g,b) { \ -- cgit v1.2.1