Re: [U-Boot] [PATCH 2/3] video: sm501.c: add weak default functions

2010-06-12 Thread Anatolij Gustschin
On Wed, 26 May 2010 10:38:58 +0200
Anatolij Gustschin ag...@denx.de wrote:

 For boards using sm501/sm502 on PCI bus some driver
 functions normaly defined in the board code are not
 needed and empty. Provide weak default functions for
 them and do not enforce board code to define empty
 functions.
 
 Signed-off-by: Anatolij Gustschin ag...@denx.de
 ---
  drivers/video/sm501.c |   28 
  1 files changed, 28 insertions(+), 0 deletions(-)

Applied to u-boot-video/next.

Anatolij
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 2/3] video: sm501.c: add weak default functions

2010-05-26 Thread Anatolij Gustschin
For boards using sm501/sm502 on PCI bus some driver
functions normaly defined in the board code are not
needed and empty. Provide weak default functions for
them and do not enforce board code to define empty
functions.

Signed-off-by: Anatolij Gustschin ag...@denx.de
---
 drivers/video/sm501.c |   28 
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/drivers/video/sm501.c b/drivers/video/sm501.c
index 544e0a0..40606db 100644
--- a/drivers/video/sm501.c
+++ b/drivers/video/sm501.c
@@ -95,6 +95,34 @@ static struct pci_device_id sm501_pci_tbl[] = {
 };
 #endif
 
+/*
+ * We do not enforce board code to provide empty/unused
+ * functions for this driver and define weak default
+ * functions here.
+ */
+unsigned int __board_video_init (void)
+{
+   return 0;
+}
+
+unsigned int board_video_init (void)
+   __attribute__((weak, alias(__board_video_init)));
+
+unsigned int __board_video_get_fb (void)
+{
+   return 0;
+}
+
+unsigned int board_video_get_fb (void)
+   __attribute__((weak, alias(__board_video_get_fb)));
+
+void __board_validate_screen (unsigned int base)
+{
+}
+
+void board_validate_screen (unsigned int base)
+   __attribute__((weak, alias(__board_validate_screen)));
+
 /*-
  * video_hw_init --
  *-
-- 
1.6.2.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot