diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2015-10-17 16:36:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-17 21:32:21 -0700 |
commit | e176058f0de53c2346734e5254835e0045364001 (patch) | |
tree | b5a4e03beb2a24c03ca5023599f045cc5375828a /drivers/tty/tty_buffer.c | |
parent | 4b41b9539a1e9531f942ededfcdcff372317d2e7 (diff) | |
download | linux-stable-e176058f0de53c2346734e5254835e0045364001.tar.gz linux-stable-e176058f0de53c2346734e5254835e0045364001.tar.bz2 linux-stable-e176058f0de53c2346734e5254835e0045364001.zip |
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.c | 10 |
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); +} |