diff options
Diffstat (limited to 'drivers/serial/sunsu.c')
-rw-r--r-- | drivers/serial/sunsu.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 4e453fa966ae..9ca1d8b9364b 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
@@ -1376,6 +1376,14 @@ static __inline__ void wait_for_xmitr(struct uart_sunsu_port *up) | |||
1376 | } | 1376 | } |
1377 | } | 1377 | } |
1378 | 1378 | ||
1379 | static void sunsu_console_putchar(struct uart_port *port, int ch) | ||
1380 | { | ||
1381 | struct uart_sunsu_port *up = (struct uart_sunsu_port *)port; | ||
1382 | |||
1383 | wait_for_xmitr(up); | ||
1384 | serial_out(up, UART_TX, ch); | ||
1385 | } | ||
1386 | |||
1379 | /* | 1387 | /* |
1380 | * Print a string to the serial port trying not to disturb | 1388 | * Print a string to the serial port trying not to disturb |
1381 | * any possible real use of the port... | 1389 | * any possible real use of the port... |
@@ -1385,7 +1393,6 @@ static void sunsu_console_write(struct console *co, const char *s, | |||
1385 | { | 1393 | { |
1386 | struct uart_sunsu_port *up = &sunsu_ports[co->index]; | 1394 | struct uart_sunsu_port *up = &sunsu_ports[co->index]; |
1387 | unsigned int ier; | 1395 | unsigned int ier; |
1388 | int i; | ||
1389 | 1396 | ||
1390 | /* | 1397 | /* |
1391 | * First save the UER then disable the interrupts | 1398 | * First save the UER then disable the interrupts |
@@ -1393,22 +1400,7 @@ static void sunsu_console_write(struct console *co, const char *s, | |||
1393 | ier = serial_in(up, UART_IER); | 1400 | ier = serial_in(up, UART_IER); |
1394 | serial_out(up, UART_IER, 0); | 1401 | serial_out(up, UART_IER, 0); |
1395 | 1402 | ||
1396 | /* | 1403 | uart_console_write(&up->port, s, count, sunsu_console_putchar); |
1397 | * Now, do each character | ||
1398 | */ | ||
1399 | for (i = 0; i < count; i++, s++) { | ||
1400 | wait_for_xmitr(up); | ||
1401 | |||
1402 | /* | ||
1403 | * Send the character out. | ||
1404 | * If a LF, also do CR... | ||
1405 | */ | ||
1406 | serial_out(up, UART_TX, *s); | ||
1407 | if (*s == 10) { | ||
1408 | wait_for_xmitr(up); | ||
1409 | serial_out(up, UART_TX, 13); | ||
1410 | } | ||
1411 | } | ||
1412 | 1404 | ||
1413 | /* | 1405 | /* |
1414 | * Finally, wait for transmitter to become empty | 1406 | * Finally, wait for transmitter to become empty |