summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2010-05-01 22:21:09 +0200
committerAnatolij Gustschin <agust@denx.de>2010-06-14 12:28:28 +0200
commit105438200744ca81199606a7b62c9eb07ac6efbd (patch)
treee5bdb3063cd02672a1327966b0c710f7502d2dc1 /drivers/video
parenta6862bc123a9e6c93583879973679b0c5941a418 (diff)
downloadtalos-obmc-uboot-105438200744ca81199606a7b62c9eb07ac6efbd.tar.gz
talos-obmc-uboot-105438200744ca81199606a7b62c9eb07ac6efbd.zip
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 <agust@denx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/cfb_console.c12
-rw-r--r--drivers/video/sm501.c13
2 files changed, 12 insertions, 13 deletions
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) { \
diff --git a/drivers/video/sm501.c b/drivers/video/sm501.c
index 283d2d969c..8c963162db 100644
--- a/drivers/video/sm501.c
+++ b/drivers/video/sm501.c
@@ -131,16 +131,3 @@ void *video_hw_init (void)
return (&sm501);
}
-
-/*-----------------------------------------------------------------------------
- * video_set_lut --
- *-----------------------------------------------------------------------------
- */
-void video_set_lut (
- unsigned int index, /* color number */
- unsigned char r, /* red */
- unsigned char g, /* green */
- unsigned char b /* blue */
- )
-{
-}
OpenPOWER on IntegriCloud