mirror of
https://github.com/torvalds/linux.git
synced 2024-12-11 21:52:04 +00:00
41f1308450
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> |
||
---|---|---|
.. | ||
buffers.c | ||
DefaultKeyAssignments | ||
devsynth.c | ||
fakekey.c | ||
i18n.c | ||
i18n.h | ||
Kconfig | ||
keyhelp.c | ||
kobjects.c | ||
main.c | ||
Makefile | ||
selection.c | ||
serialio.c | ||
serialio.h | ||
speakup_acnt.h | ||
speakup_acntpc.c | ||
speakup_acntsa.c | ||
speakup_apollo.c | ||
speakup_audptr.c | ||
speakup_bns.c | ||
speakup_decext.c | ||
speakup_decpc.c | ||
speakup_dectlk.c | ||
speakup_dtlk.c | ||
speakup_dtlk.h | ||
speakup_dummy.c | ||
speakup_keypc.c | ||
speakup_ltlk.c | ||
speakup_soft.c | ||
speakup_spkout.c | ||
speakup_txprt.c | ||
speakup.h | ||
speakupmap.h | ||
speakupmap.map | ||
spk_priv_keyinfo.h | ||
spk_priv.h | ||
spk_ttyio.c | ||
spk_types.h | ||
spkguide.txt | ||
synth.c | ||
thread.c | ||
TODO | ||
varhandlers.c |