aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/sunsu.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 17:33:12 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 17:33:12 -0800
commit9d8f057acbd38d8177cf2ffd5e151d52c2477372 (patch)
tree1c3387b045a8a487ff99bf3abed1cdf41670f6e6 /drivers/serial/sunsu.c
parentMerge master.kernel.org:/home/rmk/linux-2.6-arm (diff)
parent[SERIAL] Merge avlab serial board entries in parport_serial (diff)
downloadlinux-dev-9d8f057acbd38d8177cf2ffd5e151d52c2477372.tar.xz
linux-dev-9d8f057acbd38d8177cf2ffd5e151d52c2477372.zip
Merge master.kernel.org:/home/rmk/linux-2.6-serial
* master.kernel.org:/home/rmk/linux-2.6-serial: [SERIAL] Merge avlab serial board entries in parport_serial [SERIAL] kernel console should send CRLF not LFCR
Diffstat (limited to 'drivers/serial/sunsu.c')
-rw-r--r--drivers/serial/sunsu.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index 46c44b83f57c..7fc3d3b41d18 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -1377,6 +1377,14 @@ static __inline__ void wait_for_xmitr(struct uart_sunsu_port *up)
}
}
+static void sunsu_console_putchar(struct uart_port *port, int ch)
+{
+ struct uart_sunsu_port *up = (struct uart_sunsu_port *)port;
+
+ wait_for_xmitr(up);
+ serial_out(up, UART_TX, ch);
+}
+
/*
* Print a string to the serial port trying not to disturb
* any possible real use of the port...
@@ -1386,7 +1394,6 @@ static void sunsu_console_write(struct console *co, const char *s,
{
struct uart_sunsu_port *up = &sunsu_ports[co->index];
unsigned int ier;
- int i;
/*
* First save the UER then disable the interrupts
@@ -1394,22 +1401,7 @@ static void sunsu_console_write(struct console *co, const char *s,
ier = serial_in(up, UART_IER);
serial_out(up, UART_IER, 0);
- /*
- * Now, do each character
- */
- for (i = 0; i < count; i++, s++) {
- wait_for_xmitr(up);
-
- /*
- * Send the character out.
- * If a LF, also do CR...
- */
- serial_out(up, UART_TX, *s);
- if (*s == 10) {
- wait_for_xmitr(up);
- serial_out(up, UART_TX, 13);
- }
- }
+ uart_console_write(&up->port, s, count, sunsu_console_putchar);
/*
* Finally, wait for transmitter to become empty