aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/samsung.h
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-05-20 14:05:50 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-28 12:27:22 -0700
commite4ac92df2791c1a3912643e9547941f430fda726 (patch)
tree35972365d5a1bc21456bce200ddae728ab90a831 /drivers/tty/serial/samsung.h
parenttty: serial: men_z135_uart: Don't activate TX Space available IRQ on startup (diff)
downloadlinux-dev-e4ac92df2791c1a3912643e9547941f430fda726.tar.xz
linux-dev-e4ac92df2791c1a3912643e9547941f430fda726.zip
serial: samsung: Neaten dbg uses
Add format and argument checking and fix misuses in the dbg macro. Add __printf Use %pR for resource Add #include guard to samsung.h Move static functions from .h to .c Use vscnprintf instead of length unguarded vsprintf Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/samsung.h')
-rw-r--r--drivers/tty/serial/samsung.h23
1 files changed, 3 insertions, 20 deletions
diff --git a/drivers/tty/serial/samsung.h b/drivers/tty/serial/samsung.h
index 8827e5424cef..eb071dd19b2d 100644
--- a/drivers/tty/serial/samsung.h
+++ b/drivers/tty/serial/samsung.h
@@ -1,3 +1,6 @@
+#ifndef __SAMSUNG_H
+#define __SAMSUNG_H
+
/*
* Driver for Samsung SoC onboard UARTs.
*
@@ -77,24 +80,4 @@ struct s3c24xx_uart_port {
#define wr_regb(port, reg, val) __raw_writeb(val, portaddr(port, reg))
#define wr_regl(port, reg, val) __raw_writel(val, portaddr(port, reg))
-#if defined(CONFIG_SERIAL_SAMSUNG_DEBUG) && \
- defined(CONFIG_DEBUG_LL) && \
- !defined(MODULE)
-
-extern void printascii(const char *);
-
-static void dbg(const char *fmt, ...)
-{
- va_list va;
- char buff[256];
-
- va_start(va, fmt);
- vsprintf(buff, fmt, va);
- va_end(va);
-
- printascii(buff);
-}
-
-#else
-#define dbg(x...) do { } while (0)
#endif