aboutsummaryrefslogtreecommitdiff
path: root/drivers/serial/serial-uclass.c
diff options
context:
space:
mode:
authorMasahiro Yamada2017-06-22 16:48:49 +0900
committerTom Rini2017-07-06 13:09:35 -0400
commit49ddcf3e0e923040ef554d9ea033e0d8ba7e80e1 (patch)
tree39424324a20bd8d217a51240647959524193053c /drivers/serial/serial-uclass.c
parent7e09145ea2e985511c660bdf567b61614acd75b3 (diff)
serial: make serial_stub_* to static functions
Add missing static to serial_stub_puts(). Unexport serial_stub_{getc,tstc} because they are used locally. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/serial/serial-uclass.c')
-rw-r--r--drivers/serial/serial-uclass.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index a9c4f89e1a0..200f4b9fd72 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -212,27 +212,30 @@ void serial_stdio_init(void)
{
}
-#if defined(CONFIG_DM_STDIO) && CONFIG_IS_ENABLED(SERIAL_PRESENT)
+#if defined(CONFIG_DM_STDIO)
+
+#if CONFIG_IS_ENABLED(SERIAL_PRESENT)
static void serial_stub_putc(struct stdio_dev *sdev, const char ch)
{
_serial_putc(sdev->priv, ch);
}
#endif
-void serial_stub_puts(struct stdio_dev *sdev, const char *str)
+static void serial_stub_puts(struct stdio_dev *sdev, const char *str)
{
_serial_puts(sdev->priv, str);
}
-int serial_stub_getc(struct stdio_dev *sdev)
+static int serial_stub_getc(struct stdio_dev *sdev)
{
return _serial_getc(sdev->priv);
}
-int serial_stub_tstc(struct stdio_dev *sdev)
+static int serial_stub_tstc(struct stdio_dev *sdev)
{
return _serial_tstc(sdev->priv);
}
+#endif
/**
* on_baudrate() - Update the actual baudrate when the env var changes