]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
serial: imx: stop casting struct uart_port to struct imx_port
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Tue, 28 May 2024 09:40:21 +0000 (11:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jun 2024 12:01:24 +0000 (14:01 +0200)
commit3093f180bc6e3b5442391e6d58a3cb08d88c9769
tree10dd5663f8f0f2b92412b039b5183e21ca6de06b
parent80c4d3d4890563632d7bcc8d048dbd4e1c519f17
serial: imx: stop casting struct uart_port to struct imx_port

struct imx_port does have a struct uart_port as its first member, so
the current code works, but it is not how kernel code is usually
written.

Similar to many other serial drivers, introduce and use a
to_imx_port() helper based on container_of(). No functional change.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20240528094022.2161066-1-linux@rasmusvillemoes.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c