All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yangtao Li <frank.li@vivo.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	Liviu Dudau <liviu.dudau@arm.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Yangtao Li <frank.li@vivo.com>,
	linux-serial@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 09/15] serial: mps2-uart: Use devm_platform_get_and_ioremap_resource()
Date: Wed, 12 Jul 2023 14:28:47 +0800	[thread overview]
Message-ID: <20230712062853.11007-9-frank.li@vivo.com> (raw)
In-Reply-To: <20230712062853.11007-1-frank.li@vivo.com>

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/tty/serial/mps2-uart.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tty/serial/mps2-uart.c b/drivers/tty/serial/mps2-uart.c
index 860d161fa594..8ca62e7b7ab6 100644
--- a/drivers/tty/serial/mps2-uart.c
+++ b/drivers/tty/serial/mps2-uart.c
@@ -539,8 +539,7 @@ static int mps2_init_port(struct platform_device *pdev,
 	struct resource *res;
 	int ret;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mps_port->port.membase = devm_ioremap_resource(&pdev->dev, res);
+	mps_port->port.membase = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
 	if (IS_ERR(mps_port->port.membase))
 		return PTR_ERR(mps_port->port.membase);
 
-- 
2.39.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Yangtao Li <frank.li@vivo.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	Liviu Dudau <liviu.dudau@arm.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Yangtao Li <frank.li@vivo.com>,
	linux-serial@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 09/15] serial: mps2-uart: Use devm_platform_get_and_ioremap_resource()
Date: Wed, 12 Jul 2023 14:28:47 +0800	[thread overview]
Message-ID: <20230712062853.11007-9-frank.li@vivo.com> (raw)
In-Reply-To: <20230712062853.11007-1-frank.li@vivo.com>

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/tty/serial/mps2-uart.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tty/serial/mps2-uart.c b/drivers/tty/serial/mps2-uart.c
index 860d161fa594..8ca62e7b7ab6 100644
--- a/drivers/tty/serial/mps2-uart.c
+++ b/drivers/tty/serial/mps2-uart.c
@@ -539,8 +539,7 @@ static int mps2_init_port(struct platform_device *pdev,
 	struct resource *res;
 	int ret;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mps_port->port.membase = devm_ioremap_resource(&pdev->dev, res);
+	mps_port->port.membase = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
 	if (IS_ERR(mps_port->port.membase))
 		return PTR_ERR(mps_port->port.membase);
 
-- 
2.39.0


  parent reply	other threads:[~2023-07-12  6:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-12  6:28 [PATCH 01/15] serial: ar933x: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-12  6:28 ` [PATCH 02/15] serial: bcm63xx-uart: " Yangtao Li
2023-07-12  6:28 ` [PATCH 03/15] serial: clps711x: " Yangtao Li
2023-07-12  6:28   ` Yangtao Li
2023-07-12  6:28 ` [PATCH 04/15] serial: linflexuart: " Yangtao Li
2023-07-12  6:28 ` [PATCH 05/15] serial: tegra: " Yangtao Li
2023-07-12  6:28 ` [PATCH 06/15] serial: omap: " Yangtao Li
2023-07-12  6:28 ` [PATCH 07/15] serial: fsl_lpuart: " Yangtao Li
2023-07-12  6:28 ` [PATCH 08/15] serial: vt8500: " Yangtao Li
2023-07-12  6:28   ` Yangtao Li
2023-07-12  6:28 ` Yangtao Li [this message]
2023-07-12  6:28   ` [PATCH 09/15] serial: mps2-uart: " Yangtao Li
2023-07-13 13:18   ` Sudeep Holla
2023-07-13 13:18     ` Sudeep Holla
2023-07-12  6:28 ` [PATCH 10/15] serial: sprd: " Yangtao Li
2023-07-12  6:28 ` [PATCH 11/15] serial: sccnxp: " Yangtao Li
2023-07-12  6:28 ` [PATCH 12/15] serial: mvebu-uart: " Yangtao Li
2023-07-12  6:28 ` [PATCH 13/15] serial: sifive: " Yangtao Li
2023-07-12  6:28   ` Yangtao Li
2023-07-12  6:28 ` [PATCH 14/15] serial: imx: " Yangtao Li
2023-07-12  6:28   ` Yangtao Li
2023-07-12  6:28 ` [PATCH 15/15] serial: st-asc: " Yangtao Li
2023-07-12  6:28   ` Yangtao Li

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=20230712062853.11007-9-frank.li@vivo.com \
    --to=frank.li@vivo.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=lpieralisi@kernel.org \
    --cc=sudeep.holla@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.