Skip to content

Commit 9cf6e24

Browse files
jwrdegoededtor
authored andcommitted
Input: atkbd - do not skip atkbd_deactivate() when skipping ATKBD_CMD_GETID
After commit 936e4d4 ("Input: atkbd - skip ATKBD_CMD_GETID in translated mode") not only the getid command is skipped, but also the de-activating of the keyboard at the end of atkbd_probe(), potentially re-introducing the problem fixed by commit be2d7e4 ("Input: atkbd - fix multi-byte scancode handling on reconnect"). Make sure multi-byte scancode handling on reconnect is still handled correctly by not skipping the atkbd_deactivate() call. Fixes: 936e4d4 ("Input: atkbd - skip ATKBD_CMD_GETID in translated mode") Tested-by: Paul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20240126160724.13278-3-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 683cd82 commit 9cf6e24

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/input/keyboard/atkbd.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ static int atkbd_probe(struct atkbd *atkbd)
826826

827827
if (atkbd_skip_getid(atkbd)) {
828828
atkbd->id = 0xab83;
829-
return 0;
829+
goto deactivate_kbd;
830830
}
831831

832832
/*
@@ -863,6 +863,7 @@ static int atkbd_probe(struct atkbd *atkbd)
863863
return -1;
864864
}
865865

866+
deactivate_kbd:
866867
/*
867868
* Make sure nothing is coming from the keyboard and disturbs our
868869
* internal state.

0 commit comments

Comments
 (0)