diff options
Diffstat (limited to 'kernel/drivers/tty/tty_ioctl.c')
-rw-r--r-- | kernel/drivers/tty/tty_ioctl.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/kernel/drivers/tty/tty_ioctl.c b/kernel/drivers/tty/tty_ioctl.c index 8e53fe469..1445dd39a 100644 --- a/kernel/drivers/tty/tty_ioctl.c +++ b/kernel/drivers/tty/tty_ioctl.c @@ -26,6 +26,12 @@ #undef TTY_DEBUG_WAIT_UNTIL_SENT +#ifdef TTY_DEBUG_WAIT_UNTIL_SENT +# define tty_debug_wait_until_sent(tty, f, args...) tty_debug(tty, f, ##args) +#else +# define tty_debug_wait_until_sent(tty, f, args...) do {} while (0) +#endif + #undef DEBUG /* @@ -210,11 +216,8 @@ int tty_unthrottle_safe(struct tty_struct *tty) void tty_wait_until_sent(struct tty_struct *tty, long timeout) { -#ifdef TTY_DEBUG_WAIT_UNTIL_SENT - char buf[64]; + tty_debug_wait_until_sent(tty, "\n"); - printk(KERN_DEBUG "%s wait until sent...\n", tty_name(tty, buf)); -#endif if (!timeout) timeout = MAX_SCHEDULE_TIMEOUT; @@ -1144,16 +1147,12 @@ int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file, spin_unlock_irq(&tty->flow_lock); break; case TCIOFF: - down_read(&tty->termios_rwsem); if (STOP_CHAR(tty) != __DISABLED_CHAR) retval = tty_send_xchar(tty, STOP_CHAR(tty)); - up_read(&tty->termios_rwsem); break; case TCION: - down_read(&tty->termios_rwsem); if (START_CHAR(tty) != __DISABLED_CHAR) retval = tty_send_xchar(tty, START_CHAR(tty)); - up_read(&tty->termios_rwsem); break; default: return -EINVAL; |