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

login
register
mail settings
Submitter Enrico Weigelt, metux IT consult
Date March 14, 2019, 10:33 p.m.
Message ID <1552602855-26086-26-git-send-email-info@metux.net>
Download mbox | patch
Permalink /patch/749097/
State New
Headers show

Comments

Enrico Weigelt, metux IT consult - March 14, 2019, 10:33 p.m.
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(-)

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;