Re: [PATCH] serial: imx: stop casting struct uart_port to struct imx_port
From: Fabio Estevam
Date: Tue May 28 2024 - 09:23:08 EST
On Tue, May 28, 2024 at 6:40 AM Rasmus Villemoes
<linux@xxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Fabio Estevam <festevam@xxxxxxxxx>