summaryrefslogtreecommitdiff
path: root/drivers/tty/tty_buffer.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2015-10-17 23:36:23 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-18 07:32:21 +0300
commite176058f0de53c2346734e5254835e0045364001 (patch)
treeb5a4e03beb2a24c03ca5023599f045cc5375828a /drivers/tty/tty_buffer.c
parent4b41b9539a1e9531f942ededfcdcff372317d2e7 (diff)
downloadlinux-e176058f0de53c2346734e5254835e0045364001.tar.xz
tty: Abstract tty buffer work
Introduce API functions to restart and cancel tty buffer work, rather than manipulate buffer work directly. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_buffer.c')
-rw-r--r--drivers/tty/tty_buffer.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index a660ab181cca..7cc16db37e0e 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -587,3 +587,13 @@ void tty_buffer_set_lock_subclass(struct tty_port *port)
{
lockdep_set_subclass(&port->buf.lock, TTY_LOCK_SLAVE);
}
+
+bool tty_buffer_restart_work(struct tty_port *port)
+{
+ return queue_work(system_unbound_wq, &port->buf.work);
+}
+
+bool tty_buffer_cancel_work(struct tty_port *port)
+{
+ return cancel_work_sync(&port->buf.work);
+}