mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Merge 3.12-rc4 into tty-next
We want the tty fixes in this branch as well. Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
commit
97a7729a5c
316 changed files with 2821 additions and 1750 deletions
|
|
@ -636,6 +636,7 @@ struct console xenboot_console = {
|
|||
.name = "xenboot",
|
||||
.write = xenboot_write_console,
|
||||
.flags = CON_PRINTBUFFER | CON_BOOT | CON_ANYTIME,
|
||||
.index = -1,
|
||||
};
|
||||
#endif /* CONFIG_EARLY_PRINTK */
|
||||
|
||||
|
|
|
|||
|
|
@ -2176,28 +2176,34 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
|
|||
|
||||
if (!input_available_p(tty, 0)) {
|
||||
if (test_bit(TTY_OTHER_CLOSED, &tty->flags)) {
|
||||
retval = -EIO;
|
||||
break;
|
||||
}
|
||||
if (tty_hung_up_p(file))
|
||||
break;
|
||||
if (!timeout)
|
||||
break;
|
||||
if (file->f_flags & O_NONBLOCK) {
|
||||
retval = -EAGAIN;
|
||||
break;
|
||||
}
|
||||
if (signal_pending(current)) {
|
||||
retval = -ERESTARTSYS;
|
||||
break;
|
||||
}
|
||||
n_tty_set_room(tty);
|
||||
up_read(&tty->termios_rwsem);
|
||||
up_read(&tty->termios_rwsem);
|
||||
tty_flush_to_ldisc(tty);
|
||||
down_read(&tty->termios_rwsem);
|
||||
if (!input_available_p(tty, 0)) {
|
||||
retval = -EIO;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (tty_hung_up_p(file))
|
||||
break;
|
||||
if (!timeout)
|
||||
break;
|
||||
if (file->f_flags & O_NONBLOCK) {
|
||||
retval = -EAGAIN;
|
||||
break;
|
||||
}
|
||||
if (signal_pending(current)) {
|
||||
retval = -ERESTARTSYS;
|
||||
break;
|
||||
}
|
||||
n_tty_set_room(tty);
|
||||
up_read(&tty->termios_rwsem);
|
||||
|
||||
timeout = schedule_timeout(timeout);
|
||||
timeout = schedule_timeout(timeout);
|
||||
|
||||
down_read(&tty->termios_rwsem);
|
||||
continue;
|
||||
down_read(&tty->termios_rwsem);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
__set_current_state(TASK_RUNNING);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue