[PATCH 12/18] Blackfin Serial Driver: fix building when debug is enabled but serial console is disabled

Bryan Wu
2009-03-06T06:44:48Z

From: Mike Frysinger <vapier.adi@gmail.com>

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
drivers/serial/bfin_5xx.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 5193d62..b89861d 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -1256,8 +1256,10 @@ void bfin_serial_debug(const char *fmt, ...)
char buf[128];
va_list ap;

+#ifdef CONFIG_SERIAL_BFIN_CONSOLE
if (bfin_serial_console.index < 0)
return; /* Too early. */
+#endif

va_start(ap, fmt);
vsprintf(buf, fmt, ap);
--
1.5.6.3