[PATCH v2 25/45] drivers: tty: serial: pxa: use devm_* functions

From: Enrico Weigelt, metux IT consult
Date: Thu Mar 14 2019 - 18:35:45 EST


Use the safer devm versions of memory mapping functions.

Signed-off-by: Enrico Weigelt, metux IT consult <info@xxxxxxxxx>
---
drivers/tty/serial/pxa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/pxa.c b/drivers/tty/serial/pxa.c
index 4932b67..9512a9f 100644
--- a/drivers/tty/serial/pxa.c
+++ b/drivers/tty/serial/pxa.c
@@ -892,7 +892,7 @@ static int serial_pxa_probe(struct platform_device *dev)
}
snprintf(sport->name, PXA_NAME_LEN - 1, "UART%d", sport->port.line + 1);

- sport->port.membase = ioremap(mmres->start, resource_size(mmres));
+ sport->port.membase = devm_ioremap_resource(sport->port.dev, mmres);
if (!sport->port.membase) {
ret = -ENOMEM;
goto err_clk;
--
1.9.1