diff mbox series

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

Message ID 1552602855-26086-26-git-send-email-info@metux.net (mailing list archive)
State Not Applicable, archived
Headers show
Series [v2,01/45] drivers: tty: serial: 8250_bcm2835aux: use devm_platform_ioremap_resource() | expand

Commit Message

Enrico Weigelt, metux IT consult March 14, 2019, 10:33 p.m. UTC
Use the safer devm versions of memory mapping functions.

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

Patch

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;