* [PATCH] serial: imx: Remove unneeded of_device_get_match_data() NULL check
@ 2020-11-26 12:46 Fabio Estevam
2020-11-30 7:25 ` Uwe Kleine-König
0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2020-11-26 12:46 UTC (permalink / raw)
To: gregkh; +Cc: Fabio Estevam, fugang.duan, linux-arm-kernel, u.kleine-koenig
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@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;
ret = of_alias_get_id(np, "serial");
if (ret < 0) {
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] serial: imx: Remove unneeded of_device_get_match_data() NULL check
2020-11-26 12:46 [PATCH] serial: imx: Remove unneeded of_device_get_match_data() NULL check Fabio Estevam
@ 2020-11-30 7:25 ` Uwe Kleine-König
2020-11-30 11:16 ` Fabio Estevam
0 siblings, 1 reply; 3+ messages in thread
From: Uwe Kleine-König @ 2020-11-30 7:25 UTC (permalink / raw)
To: Fabio Estevam; +Cc: gregkh, fugang.duan, linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1157 bytes --]
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@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/ |
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] serial: imx: Remove unneeded of_device_get_match_data() NULL check
2020-11-30 7:25 ` Uwe Kleine-König
@ 2020-11-30 11:16 ` Fabio Estevam
0 siblings, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2020-11-30 11:16 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Greg Kroah-Hartman, Fugang Duan,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
Hi Uwe,
On Mon, Nov 30, 2020 at 4:25 AM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
> Would it be sensible to fold imx_uart_probe_dt into imx_uart_probe now?
Yes, that can be done as a separate patch.
Regards,
Fabio Estevam
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-30 11:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-26 12:46 [PATCH] serial: imx: Remove unneeded of_device_get_match_data() NULL check Fabio Estevam
2020-11-30 7:25 ` Uwe Kleine-König
2020-11-30 11:16 ` Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).