diff options
author | Okash Khawaja <okash.khawaja@gmail.com> | 2017-07-16 17:18:25 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-18 09:03:21 +0200 |
commit | 9f8dced2085c33a633d2f0a1abbf13ff5a7ed8c9 (patch) | |
tree | d65cd2110cff79cad93e5261a436648156b84e37 /drivers/staging/speakup/spk_ttyio.c | |
parent | staging: speakup: safely close tty (diff) | |
download | linux-dev-9f8dced2085c33a633d2f0a1abbf13ff5a7ed8c9.tar.xz linux-dev-9f8dced2085c33a633d2f0a1abbf13ff5a7ed8c9.zip |
staging: speakup: add functions to register and unregister ldisc
This patch adds the above two functions and makes them available to
main.c where they will be called during init and exit functions of
main speakup module. Following patch will make use of them.
Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/speakup/spk_ttyio.c')
-rw-r--r-- | drivers/staging/speakup/spk_ttyio.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/staging/speakup/spk_ttyio.c b/drivers/staging/speakup/spk_ttyio.c index 924034a3de4b..9b02345f66cc 100644 --- a/drivers/staging/speakup/spk_ttyio.c +++ b/drivers/staging/speakup/spk_ttyio.c @@ -200,6 +200,18 @@ static int spk_ttyio_initialise_ldisc(struct spk_synth *synth) return ret; } +void spk_ttyio_register_ldisc(void) +{ + if (tty_register_ldisc(N_SPEAKUP, &spk_ttyio_ldisc_ops)) + pr_warn("speakup: Error registering line discipline. Most synths won't work.\n"); +} + +void spk_ttyio_unregister_ldisc(void) +{ + if (tty_unregister_ldisc(N_SPEAKUP)) + pr_warn("speakup: Couldn't unregister ldisc\n"); +} + static int spk_ttyio_out(struct spk_synth *in_synth, const char ch) { if (in_synth->alive && speakup_tty && speakup_tty->ops->write) { |