[PATCH] serial: imx: Remove unneeded of_device_get_match_data() NULL check

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Mon Nov 30 02:25:29 EST 2020


On Thu, Nov 26, 2020 at 09:46:43AM -0300, Fabio Estevam wrote:
> Since 5.10-rc1 i.MX is a devicetree-only platform and the NULL check on
> of_device_get_match_data() is no longer needed.
> 
> This check was only needed when this driver supported both DT and non-DT
> platforms.
> 
> Remove the unneeded of_device_get_match_data() NULL check.
> 
> Signed-off-by: Fabio Estevam <festevam at gmail.com>
> ---
>  drivers/tty/serial/imx.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index b50f97cb07e9..6d12453ffc54 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -2174,9 +2174,6 @@ static int imx_uart_probe_dt(struct imx_port *sport,
>  	int ret;
>  
>  	sport->devdata = of_device_get_match_data(&pdev->dev);
> -	if (!sport->devdata)
> -		/* no device tree device */
> -		return 1;

Would it be sensible to fold imx_uart_probe_dt into imx_uart_probe now?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20201130/78bbc984/attachment-0001.sig>


More information about the linux-arm-kernel mailing list