]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Input: serio - define serio_pause_rx guard to pause and resume serio ports
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 5 Sep 2024 04:17:06 +0000 (21:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Feb 2025 12:30:14 +0000 (04:30 -0800)
commit3e0686bc608ea6fd710e6ccf26f5ee06969fd3e5
treefa7fd17e8d09bbfa9c18b5b31d009d163ba03168
parent4a679448ef61f4f8d73050d914debd2eb2306a5a
Input: serio - define serio_pause_rx guard to pause and resume serio ports

[ Upstream commit 0e45a09a1da0872786885c505467aab8fb29b5b4 ]

serio_pause_rx() and serio_continue_rx() are usually used together to
temporarily stop receiving interrupts/data for a given serio port.
Define "serio_pause_rx" guard for this so that the port is always
resumed once critical section is over.

Example:

scoped_guard(serio_pause_rx, elo->serio) {
elo->expected_packet = toupper(packet[0]);
init_completion(&elo->cmd_done);
}

Link: https://lore.kernel.org/r/20240905041732.2034348-2-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Stable-dep-of: 08bd5b7c9a24 ("Input: synaptics - fix crash when enabling pass-through port")
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/linux/serio.h