]> git.sur5r.net Git - u-boot/commitdiff
common/board_f.c: fix compile error when tracing disabled
authorKevin Hilman <khilman@linaro.org>
Mon, 15 Dec 2014 20:07:52 +0000 (12:07 -0800)
committerTom Rini <trini@ti.com>
Mon, 12 Jan 2015 14:38:46 +0000 (09:38 -0500)
When CONFIG_TRACE is disabled, linking fails with:

common/built-in.o:(.data.init_sequence_f+0x8): undefined reference to `trace_early_init'

To fix, wrap trace init calls with #ifdef CONFIG_TRACE.

While at it, remove the static inline version of the init call from
trace.h as suggested by Simon Glass, since it doesnt work.

Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Acked-by: Simon Glass <sjg@chromium.org>
include/trace.h

index 871327fb358a9e894447f99fca22faa2294d31e3..09a38d782fc0287fa2194b47e58f0e1fab22d945 100644 (file)
@@ -89,14 +89,7 @@ int trace_list_calls(void *buff, int buff_size, unsigned int *needed);
  */
 void trace_set_enabled(int enabled);
 
-#ifdef CONFIG_TRACE_EARLY
 int trace_early_init(void);
-#else
-static inline int trace_early_init(void)
-{
-       return 0;
-}
-#endif
 
 /**
  * Init the trace system