summaryrefslogtreecommitdiff
path: root/lib/tiny-printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tiny-printf.c')
-rw-r--r--lib/tiny-printf.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c
index 0b04813dc2..e29377e000 100644
--- a/lib/tiny-printf.c
+++ b/lib/tiny-printf.c
@@ -23,11 +23,6 @@ struct printf_info {
void (*putc)(struct printf_info *info, char ch);
};
-static void putc_normal(struct printf_info *info, char ch)
-{
- putc(ch);
-}
-
static void out(struct printf_info *info, char c)
{
*info->bf++ = c;
@@ -321,6 +316,12 @@ abort:
return 0;
}
+#if CONFIG_IS_ENABLED(PRINTF)
+static void putc_normal(struct printf_info *info, char ch)
+{
+ putc(ch);
+}
+
int vprintf(const char *fmt, va_list va)
{
struct printf_info info;
@@ -343,6 +344,7 @@ int printf(const char *fmt, ...)
return ret;
}
+#endif
static void putc_outstr(struct printf_info *info, char ch)
{