Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: 8250_early: squash wait_for_xmitr() into serial_putc()

Now, wait_for_xmitr() is only called from serial_putc(), and both
are short enough. They can be merged into a single function.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Masahiro Yamada and committed by
Greg Kroah-Hartman
004e2ed5 f2bfdb06

+4 -8
+4 -8
drivers/tty/serial/8250/8250_early.c
··· 73 73 74 74 #define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) 75 75 76 - static void __init wait_for_xmitr(struct uart_port *port) 76 + static void __init serial_putc(struct uart_port *port, int c) 77 77 { 78 78 unsigned int status; 79 + 80 + serial8250_early_out(port, UART_TX, c); 79 81 80 82 for (;;) { 81 83 status = serial8250_early_in(port, UART_LSR); 82 84 if ((status & BOTH_EMPTY) == BOTH_EMPTY) 83 - return; 85 + break; 84 86 cpu_relax(); 85 87 } 86 - } 87 - 88 - static void __init serial_putc(struct uart_port *port, int c) 89 - { 90 - serial8250_early_out(port, UART_TX, c); 91 - wait_for_xmitr(port); 92 88 } 93 89 94 90 static void __init early_serial8250_write(struct console *console,