diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/Kconfig | 3 | ||||
-rw-r--r-- | drivers/char/pcmcia/synclink_cs.c | 8 | ||||
-rw-r--r-- | drivers/char/ttyprintk.c | 16 |
3 files changed, 23 insertions, 4 deletions
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 55f48375e3fe..69fd31ffb847 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -18,7 +18,8 @@ config TTY_PRINTK The feature is useful to inline user messages with kernel messages. In order to use this feature, you should output user messages - to /dev/ttyprintk or redirect console to this TTY. + to /dev/ttyprintk or redirect console to this TTY, or boot + the kernel with console=ttyprintk. If unsure, say N. diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 78baba55a8b5..0daf1bc95360 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c @@ -1418,7 +1418,11 @@ static void mgslpc_change_params(MGSLPC_INFO *info, struct tty_struct *tty) info->serial_signals &= ~(SerialSignal_RTS | SerialSignal_DTR); /* byte size and parity */ - + if ((cflag & CSIZE) != CS8) { + cflag &= ~CSIZE; + cflag |= CS7; + tty->termios.c_cflag = cflag; + } info->params.data_bits = tty_get_char_size(cflag); if (cflag & CSTOPB) @@ -1432,10 +1436,8 @@ static void mgslpc_change_params(MGSLPC_INFO *info, struct tty_struct *tty) info->params.parity = ASYNC_PARITY_ODD; else info->params.parity = ASYNC_PARITY_EVEN; -#ifdef CMSPAR if (cflag & CMSPAR) info->params.parity = ASYNC_PARITY_SPACE; -#endif } /* calculate number of jiffies to transmit a full diff --git a/drivers/char/ttyprintk.c b/drivers/char/ttyprintk.c index adf941c47506..ed45d04905c2 100644 --- a/drivers/char/ttyprintk.c +++ b/drivers/char/ttyprintk.c @@ -11,6 +11,7 @@ * of the boot process, for example. */ +#include <linux/console.h> #include <linux/device.h> #include <linux/serial.h> #include <linux/tty.h> @@ -163,6 +164,18 @@ static const struct tty_port_operations tpk_port_ops = { static struct tty_driver *ttyprintk_driver; +static struct tty_driver *ttyprintk_console_device(struct console *c, + int *index) +{ + *index = 0; + return ttyprintk_driver; +} + +static struct console ttyprintk_console = { + .name = "ttyprintk", + .device = ttyprintk_console_device, +}; + static int __init ttyprintk_init(void) { int ret; @@ -195,6 +208,8 @@ static int __init ttyprintk_init(void) goto error; } + register_console(&ttyprintk_console); + return 0; error: @@ -205,6 +220,7 @@ error: static void __exit ttyprintk_exit(void) { + unregister_console(&ttyprintk_console); tty_unregister_driver(ttyprintk_driver); tty_driver_kref_put(ttyprintk_driver); tty_port_destroy(&tpk_port.port); |