serial: Use default_serial_puts() in drivers
Replace the in-place ad-hoc implementation of serial_puts() within
the drivers with default_serial_puts() call. This cuts down on the
code duplication quite a bit.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Tom Rini <trini@ti.com>
diff --git a/board/cogent/serial.c b/board/cogent/serial.c
index cd4a976..20631d1 100644
--- a/board/cogent/serial.c
+++ b/board/cogent/serial.c
@@ -68,12 +68,6 @@
cma_mb_reg_write (&mbsp->ser_thr, c);
}
-static void cogent_serial_puts(const char *s)
-{
- while (*s != '\0')
- serial_putc (*s++);
-}
-
static int cogent_serial_getc(void)
{
cma_mb_serial *mbsp = (cma_mb_serial *) CMA_MB_SERIAL_BASE;
@@ -96,7 +90,7 @@
.stop = NULL,
.setbrg = cogent_serial_setbrg,
.putc = cogent_serial_putc,
- .puts = cogent_serial_puts,
+ .puts = default_serial_puts,
.getc = cogent_serial_getc,
.tstc = cogent_serial_tstc,
};