linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Fabio Estevam <festevam@gmail.com>,
	fugang.duan@nxp.com, linux-arm-kernel@lists.infradead.org,
	u.kleine-koenig@pengutronix.de
Subject: [PATCH] serial: imx: Remove unneeded of_device_get_match_data() NULL check
Date: Thu, 26 Nov 2020 09:46:43 -0300	[thread overview]
Message-ID: <20201126124643.3371-1-festevam@gmail.com> (raw)

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

             reply	other threads:[~2020-11-26 12:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26 12:46 Fabio Estevam [this message]
2020-11-30  7:25 ` [PATCH] serial: imx: Remove unneeded of_device_get_match_data() NULL check Uwe Kleine-König
2020-11-30 11:16   ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201126124643.3371-1-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=fugang.duan@nxp.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).