diff options
author | Marcin Slusarz <marcin.slusarz@gmail.com> | 2009-08-09 15:54:03 -0400 |
---|---|---|
committer | Live-CD User <linux@linux.site> | 2009-09-19 16:13:35 -0400 |
commit | 9074d963f4a5ab9c45e9edea32c3df4960bc7490 (patch) | |
tree | c23305914cd22e11f7ea918b9a6d2df7a30ed91c | |
parent | e92166517e3ca9bfb416f91e69cf0373b55b6ede (diff) |
tty: vt: use printk_once
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/char/tty_ioctl.c | 4 | ||||
-rw-r--r-- | drivers/char/vt.c | 6 |
2 files changed, 2 insertions, 8 deletions
diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c index ad6ba4ed2808..8e67d5c642a4 100644 --- a/drivers/char/tty_ioctl.c +++ b/drivers/char/tty_ioctl.c | |||
@@ -393,9 +393,7 @@ void tty_termios_encode_baud_rate(struct ktermios *termios, | |||
393 | termios->c_cflag |= (BOTHER << IBSHIFT); | 393 | termios->c_cflag |= (BOTHER << IBSHIFT); |
394 | #else | 394 | #else |
395 | if (ifound == -1 || ofound == -1) { | 395 | if (ifound == -1 || ofound == -1) { |
396 | static int warned; | 396 | printk_once(KERN_WARNING "tty: Unable to return correct " |
397 | if (!warned++) | ||
398 | printk(KERN_WARNING "tty: Unable to return correct " | ||
399 | "speed data as your architecture needs updating.\n"); | 397 | "speed data as your architecture needs updating.\n"); |
400 | } | 398 | } |
401 | #endif | 399 | #endif |
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 5dfbfa7d7606..0c80c68cd047 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c | |||
@@ -2129,11 +2129,7 @@ static int do_con_write(struct tty_struct *tty, const unsigned char *buf, int co | |||
2129 | currcons = vc->vc_num; | 2129 | currcons = vc->vc_num; |
2130 | if (!vc_cons_allocated(currcons)) { | 2130 | if (!vc_cons_allocated(currcons)) { |
2131 | /* could this happen? */ | 2131 | /* could this happen? */ |
2132 | static int error = 0; | 2132 | printk_once("con_write: tty %d not allocated\n", currcons+1); |
2133 | if (!error) { | ||
2134 | error = 1; | ||
2135 | printk("con_write: tty %d not allocated\n", currcons+1); | ||
2136 | } | ||
2137 | release_console_sem(); | 2133 | release_console_sem(); |
2138 | return 0; | 2134 | return 0; |
2139 | } | 2135 | } |