diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2015-11-08 21:01:13 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-14 06:59:48 +0300 |
commit | 339f36ba14cf9f8fcf6e6b78385bd6811ec59fbe (patch) | |
tree | e5bed951017a1b12b262df03d00d1fbb8fc78db9 /drivers/tty/tty_port.c | |
parent | 0a083eddae33b6e20234d05a9cf54f87b0095511 (diff) | |
download | linux-339f36ba14cf9f8fcf6e6b78385bd6811ec59fbe.tar.xz |
tty: Define tty_*() printk macros
Since not all ttys are devices (eg., SysV ptys), dev_*() printk macros
cannot be used. Define tty_*() printk macros that output in similar
format to dev_*() macros (ie., <driver> <tty>: .....).
Transform the most-trivial printk( LEVEL ...) usage to tty_*() usage.
NB: The function name has been eliminated from messages with unique
context, or prefixed to the format when given.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_port.c')
-rw-r--r-- | drivers/tty/tty_port.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c index 482f33f20043..846ed481c24f 100644 --- a/drivers/tty/tty_port.c +++ b/drivers/tty/tty_port.c @@ -462,14 +462,13 @@ int tty_port_close_start(struct tty_port *port, spin_lock_irqsave(&port->lock, flags); if (tty->count == 1 && port->count != 1) { - printk(KERN_WARNING - "tty_port_close_start: tty->count = 1 port count = %d.\n", - port->count); + tty_warn(tty, "%s: tty->count = 1 port count = %d\n", __func__, + port->count); port->count = 1; } if (--port->count < 0) { - printk(KERN_WARNING "tty_port_close_start: count = %d\n", - port->count); + tty_warn(tty, "%s: bad port count (%d)\n", __func__, + port->count); port->count = 0; } |