diff options
author | Jiri Slaby (SUSE) <jirislaby@kernel.org> | 2023-08-10 12:14:39 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-11 22:12:44 +0300 |
commit | af815336556df28f800669c58ab3bdad7d786b98 (patch) | |
tree | fef5b822cfe6df5d882dbc67674a38c53f932b3b /drivers/tty/tty_io.c | |
parent | 1d28dfedd204c6ae58c9f08990a0c8fb1f63dd18 (diff) | |
download | linux-af815336556df28f800669c58ab3bdad7d786b98.tar.xz |
tty: change tty_write_lock()'s ndelay parameter to bool
It's a yes-no parameter, so convert it to bool to be obvious.
Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230810091510.13006-6-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_io.c')
-rw-r--r-- | drivers/tty/tty_io.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index eb4e2e0e300d..54036a20a102 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -946,7 +946,7 @@ void tty_write_unlock(struct tty_struct *tty) wake_up_interruptible_poll(&tty->write_wait, EPOLLOUT); } -int tty_write_lock(struct tty_struct *tty, int ndelay) +int tty_write_lock(struct tty_struct *tty, bool ndelay) { if (!mutex_trylock(&tty->atomic_write_lock)) { if (ndelay) @@ -1160,7 +1160,7 @@ int tty_send_xchar(struct tty_struct *tty, char ch) return 0; } - if (tty_write_lock(tty, 0) < 0) + if (tty_write_lock(tty, false) < 0) return -ERESTARTSYS; down_read(&tty->termios_rwsem); @@ -2486,7 +2486,7 @@ static int send_break(struct tty_struct *tty, unsigned int duration) retval = tty->ops->break_ctl(tty, duration); else { /* Do the work ourselves */ - if (tty_write_lock(tty, 0) < 0) + if (tty_write_lock(tty, false) < 0) return -EINTR; retval = tty->ops->break_ctl(tty, -1); if (retval) |