Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git]
/
kernel
/
drivers
/
tty
/
tty_ioctl.c
diff --git
a/kernel/drivers/tty/tty_ioctl.c
b/kernel/drivers/tty/tty_ioctl.c
index
8e53fe4
..
1445dd3
100644
(file)
--- a/
kernel/drivers/tty/tty_ioctl.c
+++ b/
kernel/drivers/tty/tty_ioctl.c
@@
-26,6
+26,12
@@
#undef TTY_DEBUG_WAIT_UNTIL_SENT
#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
/*
#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)
{
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;
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:
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));
if (STOP_CHAR(tty) != __DISABLED_CHAR)
retval = tty_send_xchar(tty, STOP_CHAR(tty));
- up_read(&tty->termios_rwsem);
break;
case TCION:
break;
case TCION:
- down_read(&tty->termios_rwsem);
if (START_CHAR(tty) != __DISABLED_CHAR)
retval = tty_send_xchar(tty, START_CHAR(tty));
if (START_CHAR(tty) != __DISABLED_CHAR)
retval = tty_send_xchar(tty, START_CHAR(tty));
- up_read(&tty->termios_rwsem);
break;
default:
return -EINVAL;
break;
default:
return -EINVAL;