]> www.infradead.org Git - users/dwmw2/linux.git/commit
tty: serial_core: use more guard(mutex)
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Wed, 11 Dec 2024 07:49:31 +0000 (08:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 14:40:16 +0000 (15:40 +0100)
commite52ed2dd8287f7438c80e8e5e8c8bf14400cc1a2
tree3b947c12211109ed039176fa49893b9874daaf9d
parentbc9c7e56a14ba71027256c4b48e0590e0c29798f
tty: serial_core: use more guard(mutex)

Simplify 4 more functions using guard(mutex): uart_get_info(),
console_store(), serial_core_add_one_port(), and
serial_core_register_port(). Especially console_store() is now much less
convoluted. In the others, we save some goto-s and even local variables
are dropped in some.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20241211074933.92973-2-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial_core.c