lkml.org 
[lkml]   [2019]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 25/45] drivers: tty: serial: pxa: use devm_* functions
Date
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 --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
\
 
 \ /
  Last update: 2019-03-14 23:35    [W:0.196 / U:1.004 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site