]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
serial: sc16is7xx: simplify to_sc16is7xx_one() with a single parameter
authorHugo Villeneuve <hvilleneuve@dimonoff.com>
Mon, 27 Oct 2025 14:29:51 +0000 (10:29 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Oct 2025 14:25:41 +0000 (15:25 +0100)
commite92f83afaf4d6c7ee553f335bb3ddb53d5880446
tree5eaf72276e58fd4c78acdd84896b0706c6f30d73
parenta5bb146502b22fcfe1eca2c22208be451eff4357
serial: sc16is7xx: simplify to_sc16is7xx_one() with a single parameter

Simplify macro to_sc16is7xx_one() to only take one parameter, as most
of the time (19) it is called with the "port" structure name. This
improves readability.

For the remaining places where it is called (4), simply use container_of()
locally. This is similar to what is done in other drivers (ex: max310x).
For sc16is7xx_tx_proc(), first assigning "one" variable allows to simplify
"port" variable init.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://patch.msgid.link/20251027142957.1032073-10-hugo@hugovil.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sc16is7xx.c