linux/drivers/staging/speakup
Okash Khawaja 41f1308450 staging: speakup: refactor to use existing code in vt
This patch replaces speakup's implementations with calls to functions
in tty/vt/selection.c. Those functions are:

cancel_selection()
set_selection_kernel()
paste_selection()

Currently setting selection is done in interrupt context. However,
set_selection_kernel() can sleep - for instance, it requires console_lock
which can sleep. Therefore we offload that work to a work_struct thread,
following the same pattern which was already set for paste_selection().
When setting selection, we also get a reference to tty and make sure to
release the reference before returning.

struct speakup_paste_work has been renamed to the more generic
speakup_selection_work because it is now used for both pasting as well
as setting selection. When paste work is cancelled, the code wasn't
setting tty to NULL. This patch also fixes that by setting tty to NULL
so that in case of failure we don't get EBUSY forever.

Signed-off-by: Okash Khawaja <okash.khawaja@gmail.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Tested-by: Gregory Nowak <greg@gregn.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19 15:09:10 +02:00
..
DefaultKeyAssignments
Kconfig staging: add missing SPDX lines to Kconfig files 2019-04-03 11:10:15 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
TODO
buffers.c staging: speakup: use true/false instead of 1/0 2018-05-15 09:31:38 +02:00
devsynth.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fakekey.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
i18n.c staging: speakup: i18n: fix spelling mistake "phoneticly" -> "phonetically" 2018-12-05 09:39:45 +01:00
i18n.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
keyhelp.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
kobjects.c staging: speakup: fix printk KERN_LEVEL facility level warning 2019-03-18 18:53:16 +01:00
main.c staging: speakup: refactor to use existing code in vt 2019-04-19 15:09:10 +02:00
selection.c staging: speakup: refactor to use existing code in vt 2019-04-19 15:09:10 +02:00
serialio.c staging: speakup: add SPDX identifier. 2018-01-15 16:03:44 +01:00
serialio.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
speakup.h staging: speakup: refactor to use existing code in vt 2019-04-19 15:09:10 +02:00
speakup_acnt.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
speakup_acntpc.c staging: speakup: move arguments to reduce 80 chars limit 2018-11-07 12:22:33 +01:00
speakup_acntsa.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
speakup_apollo.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
speakup_audptr.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
speakup_bns.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
speakup_decext.c staging: speakup: fix line over 80 characters. 2019-03-01 09:05:00 +01:00
speakup_decpc.c staging: speakup: Spaces around operator 2019-03-18 07:05:20 +01:00
speakup_dectlk.c staging: speakup: fix line over 80 characters. 2019-03-01 09:05:00 +01:00
speakup_dtlk.c staging: speakup: remove space after a cast 2018-02-23 09:54:57 +01:00
speakup_dtlk.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
speakup_dummy.c staging: speakup: Add pause command used on switching to graphical mode 2018-05-06 19:02:37 -07:00
speakup_keypc.c staging: speakup: Add spaces around operators 2019-03-18 07:05:21 +01:00
speakup_ltlk.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
speakup_soft.c staging: speakup_soft: Fix alternate speech with other synths 2019-03-18 07:57:58 +01:00
speakup_spkout.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
speakup_txprt.c staging: speakup: remove redundant license text 2018-01-15 16:03:45 +01:00
speakupmap.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
speakupmap.map
spk_priv.h staging: speakup_soft: Fix alternate speech with other synths 2019-03-18 07:57:58 +01:00
spk_priv_keyinfo.h staging: speakup: fix line over 80 characters. 2019-03-01 09:05:00 +01:00
spk_ttyio.c staging: speakup: Comparison to NULL. 2019-03-18 07:05:19 +01:00
spk_types.h staging: speakup: refactor synths array to use a list 2018-06-17 09:05:11 +02:00
spkguide.txt
synth.c staging: speakup_soft: Fix alternate speech with other synths 2019-03-18 07:57:58 +01:00
thread.c staging: speakup: add SPDX identifier. 2018-01-15 16:03:44 +01:00
varhandlers.c staging: speakup: fix line over 80 characters. 2019-03-01 09:05:00 +01:00