summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slaby (SUSE) <jirislaby@kernel.org>2023-09-19 10:51:52 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-10-03 14:31:16 +0200
commit083cfcf38364d8a3869c46875e8ed08f9d1ee160 (patch)
treeab13c189298b55427cd70743017740854425ff7b
parenttty: stop using ndash in kernel-doc (diff)
downloadlinux-083cfcf38364d8a3869c46875e8ed08f9d1ee160.tar.xz
linux-083cfcf38364d8a3869c46875e8ed08f9d1ee160.zip
tty: tty_buffer: use bool for 'restart' in tty_buffer_unlock_exclusive()
It's a boolean value, so no need for 'int' there. Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20230919085156.1578-12-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/tty_buffer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index 5f6d0cf67571..f8883afbeeba 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -69,12 +69,11 @@ EXPORT_SYMBOL_GPL(tty_buffer_lock_exclusive);
void tty_buffer_unlock_exclusive(struct tty_port *port)
{
struct tty_bufhead *buf = &port->buf;
- int restart;
-
- restart = buf->head->commit != buf->head->read;
+ bool restart = buf->head->commit != buf->head->read;
atomic_dec(&buf->priority);
mutex_unlock(&buf->lock);
+
if (restart)
queue_work(system_unbound_wq, &buf->work);
}