[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1552602855-26086-38-git-send-email-info@metux.net>
Date: Thu, 14 Mar 2019 23:34:07 +0100
From: "Enrico Weigelt, metux IT consult" <info@...ux.net>
To: linux-kernel@...r.kernel.org
Cc: gregkh@...uxfoundation.org, eric@...olt.net,
stefan.wahren@...e.com, f.fainelli@...il.com, rjui@...adcom.com,
sbranden@...adcom.com, bcm-kernel-feedback-list@...adcom.com,
andriy.shevchenko@...ux.intel.com, vz@...ia.com,
matthias.bgg@...il.com, yamada.masahiro@...ionext.com,
tklauser@...tanz.ch, richard.genoud@...il.com,
macro@...ux-mips.org, u.kleine-koenig@...gutronix.de,
kernel@...gutronix.de, slemieux.tyco@...il.com,
andy.gross@...aro.org, david.brown@...aro.org, shawnguo@...nel.org,
s.hauer@...gutronix.de, festevam@...il.com, linux-imx@....com,
baohua@...nel.org, jacmet@...site.dk, linux-serial@...r.kernel.org,
linux-arm-msm@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: [PATCH v2 37/45] drivers: tty: serial: apbuart: use devm_* functions
Use the safer devm versions of memory mapping functions.
Signed-off-by: Enrico Weigelt, metux IT consult <info@...ux.net>
---
drivers/tty/serial/apbuart.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/apbuart.c b/drivers/tty/serial/apbuart.c
index 60cd133..5eaaee9 100644
--- a/drivers/tty/serial/apbuart.c
+++ b/drivers/tty/serial/apbuart.c
@@ -293,12 +293,15 @@ static const char *apbuart_type(struct uart_port *port)
static void apbuart_release_port(struct uart_port *port)
{
- release_mem_region(port->mapbase, 0x100);
+ devm_release_mem_region(port->dev, port->mapbase, 0x100);
}
static int apbuart_request_port(struct uart_port *port)
{
- return request_mem_region(port->mapbase, 0x100, "grlib-apbuart")
+ return devm_request_mem_region(port->dev,
+ port->mapbase,
+ 0x100,
+ "grlib-apbuart")
!= NULL ? 0 : -EBUSY;
return 0;
}
@@ -622,7 +625,9 @@ static int __init grlib_apbuart_configure(void)
port = &grlib_apbuart_ports[line];
port->mapbase = addr;
- port->membase = ioremap(addr, sizeof(struct grlib_apbuart_regs_map));
+ port->membase = devm_ioremap(port->dev,
+ addr,
+ sizeof(struct grlib_apbuart_regs_map));
port->irq = 0;
port->iotype = UPIO_MEM;
port->ops = &grlib_apbuart_ops;
--
1.9.1
Powered by blists - more mailing lists