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
7373
7474 #define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
7575
76−static void __init wait_for_xmitr(struct uart_port *port)
76+static void __init serial_putc(struct uart_port *port, int c)
7777 {
7878 unsigned int status;
7979
80+ serial8250_early_out(port, UART_TX, c);
81+
8082 for (;;) {
8183 status = serial8250_early_in(port, UART_LSR);
8284 if ((status & BOTH_EMPTY) == BOTH_EMPTY)
83− return;
85+ break;
8486 cpu_relax();
8587 }
8688 }
8789
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−}
93−
9490 static void __init early_serial8250_write(struct console *console,
9591 const char *s, unsigned int count)
9692 {

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