1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-11-02 03:17:29 +01:00

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>
This commit is contained in:
Marek Vasut
2012-10-06 14:07:02 +00:00
committed by Tom Rini
parent bfb7d7a3d6
commit ec3fd68952
39 changed files with 39 additions and 297 deletions

View File

@@ -105,13 +105,6 @@ static void leon2_serial_putc(const char c)
leon2_serial_putc_raw(c);
}
static void leon2_serial_puts(const char *s)
{
while (*s) {
serial_putc(*s++);
}
}
static int leon2_serial_getc(void)
{
LEON2_regs *leon2 = (LEON2_regs *) LEON2_PREGS;
@@ -172,7 +165,7 @@ static struct serial_device leon2_serial_drv = {
.stop = NULL,
.setbrg = leon2_serial_setbrg,
.putc = leon2_serial_putc,
.puts = leon2_serial_puts,
.puts = default_serial_puts,
.getc = leon2_serial_getc,
.tstc = leon2_serial_tstc,
};

View File

@@ -99,13 +99,6 @@ static void leon3_serial_putc(const char c)
leon3_serial_putc_raw(c);
}
static void leon3_serial_puts(const char *s)
{
while (*s) {
serial_putc(*s++);
}
}
static int leon3_serial_getc(void)
{
if (!leon3_apbuart)
@@ -146,7 +139,7 @@ static struct serial_device leon3_serial_drv = {
.stop = NULL,
.setbrg = leon3_serial_setbrg,
.putc = leon3_serial_putc,
.puts = leon3_serial_puts,
.puts = default_serial_puts,
.getc = leon3_serial_getc,
.tstc = leon3_serial_tstc,
};