Commit 89222e62 authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman

tty: core: Prefer pr_* to printk(*)

Convert remaining printk() use to pr_*() when tty is unknown or
unsafe to use.
Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f658dca9
...@@ -268,14 +268,12 @@ static int tty_paranoia_check(struct tty_struct *tty, struct inode *inode, ...@@ -268,14 +268,12 @@ static int tty_paranoia_check(struct tty_struct *tty, struct inode *inode,
{ {
#ifdef TTY_PARANOIA_CHECK #ifdef TTY_PARANOIA_CHECK
if (!tty) { if (!tty) {
printk(KERN_WARNING pr_warn("(%d:%d): %s: NULL tty\n",
"null TTY for (%d:%d) in %s\n",
imajor(inode), iminor(inode), routine); imajor(inode), iminor(inode), routine);
return 1; return 1;
} }
if (tty->magic != TTY_MAGIC) { if (tty->magic != TTY_MAGIC) {
printk(KERN_WARNING pr_warn("(%d:%d): %s: bad magic number\n",
"bad magic number for tty struct (%d:%d) in %s\n",
imajor(inode), iminor(inode), routine); imajor(inode), iminor(inode), routine);
return 1; return 1;
} }
......
...@@ -458,10 +458,8 @@ void tty_termios_encode_baud_rate(struct ktermios *termios, ...@@ -458,10 +458,8 @@ void tty_termios_encode_baud_rate(struct ktermios *termios,
if (ifound == -1 && (ibaud != obaud || ibinput)) if (ifound == -1 && (ibaud != obaud || ibinput))
termios->c_cflag |= (BOTHER << IBSHIFT); termios->c_cflag |= (BOTHER << IBSHIFT);
#else #else
if (ifound == -1 || ofound == -1) { if (ifound == -1 || ofound == -1)
printk_once(KERN_WARNING "tty: Unable to return correct " pr_warn_once("tty: Unable to return correct speed data as your architecture needs updating.\n");
"speed data as your architecture needs updating.\n");
}
#endif #endif
} }
EXPORT_SYMBOL_GPL(tty_termios_encode_baud_rate); EXPORT_SYMBOL_GPL(tty_termios_encode_baud_rate);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment