]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: Disable dm_warn() in SPL
authorSimon Glass <sjg@chromium.org>
Tue, 11 Nov 2014 00:16:49 +0000 (17:16 -0700)
committerSimon Glass <sjg@chromium.org>
Fri, 21 Nov 2014 07:13:17 +0000 (08:13 +0100)
Since this function can use up quite a bit of space for its strings, disable
it by default in SPL. Use CONFIG_DM_WARN to re-enable it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
include/config_defaults.h
include/dm/util.h

index f1b225d670effc103d617013a6b624dedad9fdaf..4d493150444f3f8827df51f9593d3ac4ed76aec0 100644 (file)
@@ -21,6 +21,7 @@
 #define CONFIG_PARTITIONS 1
 
 #ifndef CONFIG_SPL_BUILD
+#define CONFIG_DM_WARN
 #define CONFIG_DM_DEVICE_REMOVE
 #define CONFIG_DM_STDIO
 #endif
index 6ac3a38ef008b686221a5e213e67f5e503233846..0cec17b52a413e8631bd0cc54c08d226e049515b 100644 (file)
@@ -7,7 +7,13 @@
 #ifndef __DM_UTIL_H
 #define __DM_UTIL_H
 
+#ifdef CONFIG_DM_WARN
 void dm_warn(const char *fmt, ...);
+#else
+static inline void dm_warn(const char *fmt, ...)
+{
+}
+#endif
 
 #ifdef DEBUG
 void dm_dbg(const char *fmt, ...);