[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220118030911.12815-3-yu.tu@amlogic.com>
Date: Tue, 18 Jan 2022 11:09:08 +0800
From: Yu Tu <yu.tu@...ogic.com>
To: <linux-serial@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-amlogic@...ts.infradead.org>, <linux-kernel@...r.kernel.org>
CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
Neil Armstrong <narmstrong@...libre.com>,
Kevin Hilman <khilman@...libre.com>,
Jerome Brunet <jbrunet@...libre.com>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
Yu Tu <yu.tu@...ogic.com>
Subject: [PATCH V6 2/5] tty: serial: meson: Use devm_ioremap_resource to get register mapped memory
Replace devm_request_mem_region and devm_ioremap with
devm_ioremap_resource to make the code cleaner.
Signed-off-by: Yu Tu <yu.tu@...ogic.com>
---
drivers/tty/serial/meson_uart.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
index 6b80e41b4cc1..7570958d010c 100644
--- a/drivers/tty/serial/meson_uart.c
+++ b/drivers/tty/serial/meson_uart.c
@@ -720,15 +720,7 @@ static int meson_uart_probe(struct platform_device *pdev)
if (!port)
return -ENOMEM;
- if (!devm_request_mem_region(&pdev->dev, res_mem->start,
- resource_size(res_mem),
- dev_name(&pdev->dev))) {
- dev_err(&pdev->dev, "Memory region busy\n");
- return -EBUSY;
- }
-
- port->membase = devm_ioremap(&pdev->dev, res_mem->start,
- resource_size(res_mem));
+ port->membase = devm_ioremap_resource(&pdev->dev, res_mem);
if (IS_ERR(port->membase))
return PTR_ERR(port->membase);
--
2.33.1
Powered by blists - more mailing lists