diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2016-04-09 17:06:48 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-30 09:26:55 -0700 |
commit | 18900ca65a8553edc608b6c9d518eb31e6c09ba1 (patch) | |
tree | 6712f933f9145ce4ad365388817266c0c9ebac68 /include/linux/tty.h | |
parent | 1aabf523a288b09d660992c22e307110c70f746d (diff) | |
download | linux-18900ca65a8553edc608b6c9d518eb31e6c09ba1.tar.gz linux-18900ca65a8553edc608b6c9d518eb31e6c09ba1.tar.bz2 linux-18900ca65a8553edc608b6c9d518eb31e6c09ba1.zip |
tty: Replace TTY_IO_ERROR bit tests with tty_io_error()
Abstract TTY_IO_ERROR status test treewide with tty_io_error().
NB: tty->flags uses atomic bit ops; replace non-atomic bit test
with test_bit().
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r-- | include/linux/tty.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index 3b09f235db66..68d829bf93b8 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -360,6 +360,11 @@ static inline void tty_set_flow_change(struct tty_struct *tty, int val) smp_mb(); } +static inline bool tty_io_error(struct tty_struct *tty) +{ + return test_bit(TTY_IO_ERROR, &tty->flags); +} + #ifdef CONFIG_TTY extern void console_init(void); extern void tty_kref_put(struct tty_struct *tty); |