diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2024-09-05 06:17:13 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2024-10-04 09:58:15 +0200 |
commit | 69a2229b05046eb42258b45df1f43248de8a3472 (patch) | |
tree | 8e15e45eb85b85f37134413271a520eb61681ff9 /drivers/input | |
parent | Input: sunkbd - use guard notation when pausing serio port (diff) | |
download | linux-69a2229b05046eb42258b45df1f43248de8a3472.tar.xz linux-69a2229b05046eb42258b45df1f43248de8a3472.zip |
Input: synaptics-rmi4 - use guard notation when pausing serio port in F03
Using guard notation makes the code more compact and error handling
more robust by ensuring that serio ports are resumed in all code paths
when control leaves critical section.
Link: https://lore.kernel.org/r/20240905041732.2034348-9-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/rmi4/rmi_f03.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/rmi4/rmi_f03.c b/drivers/input/rmi4/rmi_f03.c index 1e11ea30d7bd..e1157ff0f00a 100644 --- a/drivers/input/rmi4/rmi_f03.c +++ b/drivers/input/rmi4/rmi_f03.c @@ -61,14 +61,14 @@ void rmi_f03_commit_buttons(struct rmi_function *fn) struct f03_data *f03 = dev_get_drvdata(&fn->dev); struct serio *serio = f03->serio; - serio_pause_rx(serio); + guard(serio_pause_rx)(serio); + if (serio->drv) { serio->drv->interrupt(serio, PSMOUSE_OOB_EXTRA_BTNS, SERIO_OOB_DATA); serio->drv->interrupt(serio, f03->overwrite_buttons, SERIO_OOB_DATA); } - serio_continue_rx(serio); } static int rmi_f03_pt_write(struct serio *id, unsigned char val) |