diff options
author | 2022-02-25 15:39:18 +0800 | |
---|---|---|
committer | 2022-02-26 10:03:20 +0100 | |
commit | 6436dd8f9b25ea756b27ca0ec10d017ea51b42e2 (patch) | |
tree | 7205f7b43af8662313c00e225d38f2f0f2d339fb /drivers/tty | |
parent | tty: serial: meson: Move request the register region to probe (diff) | |
download | linux-6436dd8f9b25ea756b27ca0ec10d017ea51b42e2.tar.gz linux-6436dd8f9b25ea756b27ca0ec10d017ea51b42e2.tar.bz2 linux-6436dd8f9b25ea756b27ca0ec10d017ea51b42e2.zip |
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.
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Yu Tu <yu.tu@amlogic.com>
Link: https://lore.kernel.org/r/20220225073922.3947-3-yu.tu@amlogic.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/meson_uart.c | 10 |
1 files changed, 1 insertions, 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); |