kernel/debug-tty-print-dev-name.patch

18 lines
646 B
Diff
Raw Normal View History

2010-11-27 03:58:39 +00:00
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 878f6d6..8d6867d 100644
2010-11-26 22:05:38 +00:00
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
2010-11-27 03:58:39 +00:00
@@ -1329,7 +1330,11 @@ static int tty_reopen(struct tty_struct *tty)
2010-11-26 22:05:38 +00:00
tty->driver = driver; /* N.B. why do this every time?? */
mutex_lock(&tty->ldisc_mutex);
- WARN_ON(!test_bit(TTY_LDISC, &tty->flags));
+ if (!test_bit(TTY_LDISC, &tty->flags)) {
2010-11-27 03:58:39 +00:00
+ printk("%s: !test_bit(TTY_LDISC, &tty->flags) dev=%s ldisc=%s flags=%x\n",
+ __func__, tty->name, tty->ldisc ? tty->ldisc->ops ? tty->ldisc->ops->name : NULL : NULL, tty->flags);
2010-11-26 22:05:38 +00:00
+ WARN_ON(1);
+ }
mutex_unlock(&tty->ldisc_mutex);
return 0;