linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/24] Convert serio-related drivers to use new cleanup facilities
@ 2024-09-05  4:17 Dmitry Torokhov
  2024-09-05  4:17 ` [PATCH 01/24] Input: serio - define serio_pause_rx guard to pause and resume serio ports Dmitry Torokhov
                   ` (23 more replies)
  0 siblings, 24 replies; 27+ messages in thread
From: Dmitry Torokhov @ 2024-09-05  4:17 UTC (permalink / raw)
  To: linux-input
  Cc: Pali Rohár, Helge Deller, K. Y. Srinivasan, Wei Liu,
	Dexuan Cui, Samuel Holland, Lyude Paul, Michal Simek,
	Hans de Goede, linux-kernel, linux-hyperv, linux-arm-kernel,
	linux-sunxi

Hi,

This series converts drivers found in drivers/input/serio as well as a
few of input drivers using serio to use new __free() and guard() cleanup
facilities that simplify the code and ensure that all resources are
released appropriately.

First patch introduces serio_pause_rx guard that pauses delivery of
interrupts/data for a given serio port by calling serio_pause_rx()
helper and automatically resumes it by calling serio_resume_rx() when
needed.

The following 8 patches make use if this new guard.

The rest of the patches switch serio drivers to use guard(mutex),
guard(spinlock*) and other cleanup functions to simplify the code.

Thanks!

Dmitry Torokhov (24):
  Input: serio - define serio_pause_rx guard to pause and resume serio ports
  Input: libps2 - use guard notation when temporarily pausing serio ports
  Input: alps - use guard notation when pausing serio port
  Input: byd - use guard notation when pausing serio port
  Input: synaptics - use guard notation when pausing serio port
  Input: atkbd - use guard notation when pausing serio port
  Input: sunkbd - use guard notation when pausing serio port
  Input: synaptics-rmi4 - use guard notation when pausing serio port in F03
  Input: elo - use guard notation when pausing serio port
  Input: gscps2 - use guard notation when acquiring spinlock
  Input: hyperv-keyboard - use guard notation when acquiring spinlock
  Input: i8042 - tease apart interrupt handler
  Input: i8042 - use guard notation when acquiring spinlock
  Input: ps2-gpio - use guard notation when acquiring mutex
  Input: ps2mult - use guard notation when acquiring spinlock
  Input: q40kbd - use guard notation when acquiring spinlock
  Input: sa1111ps2 - use guard notation when acquiring spinlock
  Input: serport - use guard notation when acquiring spinlock
  Input: serio - use guard notation when acquiring mutexes and spinlocks
  Input: serio_raw - use guard notation for locks and other resources
  Input: serio-raw - fix potential serio port name truncation
  Input: sun4i-ps2 - use guard notation when acquiring spinlock
  Input: userio - switch to using cleanup functions
  Input: xilinx_ps2 - use guard notation when acquiring spinlock

 drivers/input/keyboard/atkbd.c        |   8 +-
 drivers/input/keyboard/sunkbd.c       |   5 +-
 drivers/input/mouse/alps.c            |   4 +-
 drivers/input/mouse/byd.c             |   5 +-
 drivers/input/mouse/synaptics.c       |   6 +-
 drivers/input/rmi4/rmi_f03.c          |   4 +-
 drivers/input/serio/gscps2.c          | 114 +++++----
 drivers/input/serio/hyperv-keyboard.c |  38 ++-
 drivers/input/serio/i8042.c           | 327 +++++++++++++-------------
 drivers/input/serio/libps2.c          |  28 ++-
 drivers/input/serio/ps2-gpio.c        |   4 +-
 drivers/input/serio/ps2mult.c         |  25 +-
 drivers/input/serio/q40kbd.c          |  10 +-
 drivers/input/serio/sa1111ps2.c       |   8 +-
 drivers/input/serio/serio.c           | 164 +++++--------
 drivers/input/serio/serio_raw.c       | 125 ++++------
 drivers/input/serio/serport.c         |  27 +--
 drivers/input/serio/sun4i-ps2.c       |   8 +-
 drivers/input/serio/userio.c          | 141 ++++++-----
 drivers/input/serio/xilinx_ps2.c      |  15 +-
 drivers/input/touchscreen/elo.c       |   8 +-
 include/linux/serio.h                 |   3 +
 22 files changed, 487 insertions(+), 590 deletions(-)

-- 
Dmitry


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2024-10-21 20:41 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-05  4:17 [PATCH 00/24] Convert serio-related drivers to use new cleanup facilities Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 01/24] Input: serio - define serio_pause_rx guard to pause and resume serio ports Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 02/24] Input: libps2 - use guard notation when temporarily pausing " Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 03/24] Input: alps - use guard notation when pausing serio port Dmitry Torokhov
2024-09-05 15:46   ` Pali Rohár
2024-09-05  4:17 ` [PATCH 04/24] Input: byd " Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 05/24] Input: synaptics " Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 06/24] Input: atkbd " Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 07/24] Input: sunkbd " Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 08/24] Input: synaptics-rmi4 - use guard notation when pausing serio port in F03 Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 09/24] Input: elo - use guard notation when pausing serio port Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 10/24] Input: gscps2 - use guard notation when acquiring spinlock Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 11/24] Input: hyperv-keyboard " Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 12/24] Input: i8042 - tease apart interrupt handler Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 13/24] Input: i8042 - use guard notation when acquiring spinlock Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 14/24] Input: ps2-gpio - use guard notation when acquiring mutex Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 15/24] Input: ps2mult - use guard notation when acquiring spinlock Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 16/24] Input: q40kbd " Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 17/24] Input: sa1111ps2 " Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 18/24] Input: serport " Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 19/24] Input: serio - use guard notation when acquiring mutexes and spinlocks Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 20/24] Input: serio_raw - use guard notation for locks and other resources Dmitry Torokhov
2024-10-21 20:41   ` Kees Bakker
2024-09-05  4:17 ` [PATCH 21/24] Input: serio-raw - fix potential serio port name truncation Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 22/24] Input: sun4i-ps2 - use guard notation when acquiring spinlock Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 23/24] Input: userio - switch to using cleanup functions Dmitry Torokhov
2024-09-05  4:17 ` [PATCH 24/24] Input: xilinx_ps2 - use guard notation when acquiring spinlock Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).