/* Stuff the data into the input queue of the other end */
c = tty_insert_flip_string(to->port, buf, c);
/* And shovel */
- if (c) {
+ if (c)
tty_flip_buffer_push(to->port);
- tty_wakeup(tty);
- }
}
return c;
}
struct tty_struct *pty = tty->link;
/* For a PTY we need to lock the tty side */
- down_write(&tty->termios_rwsem);
+ mutex_lock(&tty->winsize_mutex);
if (!memcmp(ws, &tty->winsize, sizeof(*ws)))
goto done;
tty->winsize = *ws;
pty->winsize = *ws; /* Never used so will go away soon */
done:
- up_write(&tty->termios_rwsem);
+ mutex_unlock(&tty->winsize_mutex);
return 0;
}