Skip to content

Commit

Permalink
speakup_dummy: log about characters received by the dummy driver
Browse files Browse the repository at this point in the history
The dummy speakup driver is used to check that speakup is working
properly, without the need for actually owning the hardware. Some
drivers require receiving characters, so we need a way to check that
this is working properly.

Signed-off-by: Samuel Thibault <[email protected]>
Link: https://lore.kernel.org/r/20201101183913.yg35cbqpn2ba6cew@function
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
sthibaul authored and gregkh committed Nov 9, 2020
1 parent 552c08a commit a79db45
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/accessibility/speakup/speakup_dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ static struct attribute *synth_attrs[] = {
NULL, /* need to NULL terminate the list of attributes */
};

static void read_buff_add(u_char c)
{
pr_info("speakup_dummy: got character %02x\n", c);
}

static struct spk_synth synth_dummy = {
.name = "dummy",
.version = DRV_VERSION,
Expand All @@ -103,7 +108,7 @@ static struct spk_synth synth_dummy = {
.flush = spk_synth_flush,
.is_alive = spk_synth_is_alive_restart,
.synth_adjust = NULL,
.read_buff_add = NULL,
.read_buff_add = read_buff_add,
.get_index = NULL,
.indexing = {
.command = NULL,
Expand Down

0 comments on commit a79db45

Please sign in to comment.