X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=kernel%2Fdrivers%2Ftty%2Ftty_ioctl.c;h=1445dd39aa6227ab641130ef7344eaba9f113b86;hb=e09b41010ba33a20a87472ee821fa407a5b8da36;hp=8e53fe4696647e6bbfd8951e3a96a0d070ce28af;hpb=f93b97fd65072de626c074dbe099a1fff05ce060;p=kvmfornfv.git 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;