History

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.

Masahiro Yamada committed 11 years ago

Commit 004e2ed1 parent f2bfdb01 file · +4 −8Browse files

Unified · Split

drivers/tty/serial/8250/8250_early.c+4−8
@@ -73,24 +73,20 @@ static void __init serial8250_early_out(struct uart_port *port, int offset, int · 72 unmodified lines
73 73
74#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)74#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
75 75
76static void __init wait_for_xmitr(struct uart_port *port)76static void __init serial_putc(struct uart_port *port, int c)
77{77{
78 unsigned int status;78 unsigned int status;
79 79
80 serial8250_early_out(port, UART_TX, c);
81
80 for (;;) {82 for (;;) {
81 status = serial8250_early_in(port, UART_LSR);83 status = serial8250_early_in(port, UART_LSR);
82 if ((status & BOTH_EMPTY) == BOTH_EMPTY)84 if ((status & BOTH_EMPTY) == BOTH_EMPTY)
83 return;85 break;
84 cpu_relax();86 cpu_relax();
85 }87 }
86}88}
87 89
88static 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}
93
94static void __init early_serial8250_write(struct console *console,90static void __init early_serial8250_write(struct console *console,
95 const char *s, unsigned int count)91 const char *s, unsigned int count)
96{92{

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t