summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/tty.h17
-rw-r--r--drivers/tty/tty_ioctl.c1
2 files changed, 18 insertions, 0 deletions
diff --git a/drivers/tty/tty.h b/drivers/tty/tty.h
index af997a4174c5..cf0b1346b346 100644
--- a/drivers/tty/tty.h
+++ b/drivers/tty/tty.h
@@ -40,6 +40,21 @@ enum {
TTY_LOCK_SLAVE,
};
+/* Values for tty->flow_change */
+#define TTY_THROTTLE_SAFE 1
+#define TTY_UNTHROTTLE_SAFE 2
+
+static inline void __tty_set_flow_change(struct tty_struct *tty, int val)
+{
+ tty->flow_change = val;
+}
+
+static inline void tty_set_flow_change(struct tty_struct *tty, int val)
+{
+ tty->flow_change = val;
+ smp_mb();
+}
+
int tty_ldisc_lock(struct tty_struct *tty, unsigned long timeout);
void tty_ldisc_unlock(struct tty_struct *tty);
@@ -57,4 +72,6 @@ static inline void tty_audit_tiocsti(struct tty_struct *tty, char ch)
}
#endif
+ssize_t redirected_tty_write(struct kiocb *, struct iov_iter *);
+
#endif
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index 420e7678330f..41f7449d0464 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -21,6 +21,7 @@
#include <linux/bitops.h>
#include <linux/mutex.h>
#include <linux/compat.h>
+#include "tty.h"
#include <asm/io.h>
#include <linux/uaccess.h>