[PATCH] serial: imx: stop casting struct uart_port to struct imx_port
Fabio Estevam
festevam at gmail.com
Tue May 28 06:19:26 PDT 2024
On Tue, May 28, 2024 at 6:40 AM Rasmus Villemoes
<linux at rasmusvillemoes.dk> wrote:
>
> 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 at rasmusvillemoes.dk>
Reviewed-by: Fabio Estevam <festevam at gmail.com>
More information about the linux-arm-kernel
mailing list