summaryrefslogtreecommitdiff
path: root/drivers/serial/serial_ns16550.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-10-23 22:26:05 +0900
committerSimon Glass <sjg@chromium.org>2014-10-23 21:43:08 -0600
commit3fdd0bb2b0dc20f192e9ea8682d5c18f37daadc1 (patch)
tree0fe4cc95f9ab9d19b7c470d501e7b5cc654959b9 /drivers/serial/serial_ns16550.c
parent86256b796ee757b7d1407233d0ca71576a7b8182 (diff)
downloadu-boot-imx-3fdd0bb2b0dc20f192e9ea8682d5c18f37daadc1.zip
u-boot-imx-3fdd0bb2b0dc20f192e9ea8682d5c18f37daadc1.tar.gz
u-boot-imx-3fdd0bb2b0dc20f192e9ea8682d5c18f37daadc1.tar.bz2
serial: add static directive to local functions
The functions _serial_putc, _serial_putc_raw, _serial_puts, _serial_getc, _serial_tstc, _serial_setbrg are defined and used locally in each of serial_ns16550.c and serial_s3c24x0.c. Add static directive to them and remove declarations from include/common.h. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/serial/serial_ns16550.c')
-rw-r--r--drivers/serial/serial_ns16550.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/serial/serial_ns16550.c b/drivers/serial/serial_ns16550.c
index 632da4c..799ef6a 100644
--- a/drivers/serial/serial_ns16550.c
+++ b/drivers/serial/serial_ns16550.c
@@ -119,8 +119,7 @@ static NS16550_t serial_ports[6] = {
.puts = eserial##port##_puts, \
}
-void
-_serial_putc(const char c,const int port)
+static void _serial_putc(const char c, const int port)
{
if (c == '\n')
NS16550_putc(PORT, '\r');
@@ -128,35 +127,29 @@ _serial_putc(const char c,const int port)
NS16550_putc(PORT, c);
}
-void
-_serial_putc_raw(const char c,const int port)
+static void _serial_putc_raw(const char c, const int port)
{
NS16550_putc(PORT, c);
}
-void
-_serial_puts (const char *s,const int port)
+static void _serial_puts(const char *s, const int port)
{
while (*s) {
- _serial_putc (*s++,port);
+ _serial_putc(*s++, port);
}
}
-
-int
-_serial_getc(const int port)
+static int _serial_getc(const int port)
{
return NS16550_getc(PORT);
}
-int
-_serial_tstc(const int port)
+static int _serial_tstc(const int port)
{
return NS16550_tstc(PORT);
}
-void
-_serial_setbrg (const int port)
+static void _serial_setbrg(const int port)
{
int clock_divisor;