diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 04:33:12 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-23 04:33:12 +0300 |
commit | 9d8f057acbd38d8177cf2ffd5e151d52c2477372 (patch) | |
tree | 1c3387b045a8a487ff99bf3abed1cdf41670f6e6 /drivers/serial/serial_core.c | |
parent | 591eb85ecd7e6eb8596c6129ae074e16636b99f4 (diff) | |
parent | 91bca4b3e2f1aaaf67e62a36914f33ca1e7d5a06 (diff) | |
download | linux-9d8f057acbd38d8177cf2ffd5e151d52c2477372.tar.xz |
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/serial_core.c')
-rw-r--r-- | drivers/serial/serial_core.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index cc1faa31d124..fcd7744c4253 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c @@ -1755,6 +1755,27 @@ static int uart_read_proc(char *page, char **start, off_t off, #ifdef CONFIG_SERIAL_CORE_CONSOLE /* + * uart_console_write - write a console message to a serial port + * @port: the port to write the message + * @s: array of characters + * @count: number of characters in string to write + * @write: function to write character to port + */ +void uart_console_write(struct uart_port *port, const char *s, + unsigned int count, + void (*putchar)(struct uart_port *, int)) +{ + unsigned int i; + + for (i = 0; i < count; i++, s++) { + if (*s == '\n') + putchar(port, '\r'); + putchar(port, *s); + } +} +EXPORT_SYMBOL_GPL(uart_console_write); + +/* * Check whether an invalid uart number has been specified, and * if so, search for the first available port that does have * console support. |