]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
serial: 8250: introduce RPM guard()s
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Thu, 14 Aug 2025 07:24:44 +0000 (09:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Aug 2025 10:46:25 +0000 (12:46 +0200)
commit9f8da7b2f90cb5fb4c585d5e8aa89dfd724bd377
treedf99d3e9608a875419056c6370bf56a614d9c8ce
parent0fd60b689b0dacce659253ec15cb3d3bf660e30b
serial: 8250: introduce RPM guard()s

Having this, guards like these work:
  guard(serial8250_rpm)(up);
or
  scoped_guard(serial8250_rpm, up) {
    ...
  }

See e.g. "serial: 8250: use guard()s" later in this series.

And make them available to anyone (EXPORT + put in 8250.h) as drivers
open code this anyway.

The _tx ones are not defined as they would have no user.

Signed-off-by: "Jiri Slaby (SUSE)" <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20250814072456.182853-5-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250.h
drivers/tty/serial/8250/8250_port.c