[U-Boot] [PATCH 1/2] time: add weak annotation to timer_read_counter declaration

Rob Herring robherring2 at gmail.com
Fri Nov 8 15:40:43 CET 2013


From: Rob Herring <rob.herring at calxeda.com>

A weak annotation is needed in order to prevent link errors when
get_ticks is overridden. This fixes sandbox build.

Signed-off-by: Rob Herring <rob.herring at calxeda.com>
---
 lib/time.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/time.c b/lib/time.c
index 8361ddd..111b493 100644
--- a/lib/time.c
+++ b/lib/time.c
@@ -37,7 +37,7 @@ unsigned long notrace timer_read_counter(void)
 #endif
 }
 #else
-extern unsigned long timer_read_counter(void);
+extern unsigned long __weak timer_read_counter(void);
 #endif
 
 unsigned long long __weak notrace get_ticks(void)
-- 
1.8.1.2



More information about the U-Boot mailing list