Skip to content

staging: speakup: factor out selection code

Okash Khawaja lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyIn review
  2. v12 patches 3 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2vt: selection: allow functions to be called from inside kerneldrivers/tty/vt/selection.c drivers/tty/vt/vt.c include/linux/selection.h+38 -220 replies
2/2staging: speakup: refactor to use existing code in vtdrivers/staging/speakup/main.c drivers/staging/speakup/selection.c drivers/staging/speakup/speakup.h+88 -1260 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchSamuel ThibaultGregory Nowak
1/2R-b T-b
2/2R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] staging: speakup: factor out selection code

Hi,

The v2 renames set_selection() and do_set_selection() to following more explicit names:

set_selection_user() /* includes copying data from user space */ set_selection_kernel() /* no copying from user space */

The patches also update references to set_selection() to be set_selection_user().

Original intro:

Speakup's selection functionality parallels that of drivers/tty/vt/selection.c. This patch set replaces speakup's implementation with calls to vt's selection code. This is one of the remaining items in our TODO file and it's needed for moving speakup out of staging.

Please note that in speakup selection is set inside interrupt context of keyboard handler. Set selection code in vt happens in process context and hence expects ability to sleep. To address this, there were two
options: farm out speakup's set selection into a work_struct thread, or create atomic version of vt's set_selection. These patches implement the former option.

Here's a summary:

Patch 1 re-arranges code in vt and exports some functions. Patch 2 replaces speakup's selection code with calls to vt's functions exported in patch 1.

Thanks,
Okash