mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
spl: Disable printf if not required
Now we have a guard for printf, disable it in the build if it's not selected. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user