* [PATCH] serial: MIPS: lantiq: use devm_iounmap instead of iounmap
@ 2014-11-06 13:30 Sudip Mukherjee
0 siblings, 0 replies; only message in thread
From: Sudip Mukherjee @ 2014-11-06 13:30 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby
Cc: Sudip Mukherjee, linux-serial, linux-kernel
port->membase was allocated using devm_ioremap_nocache, so ideally
we should unmap it using devm_iounmap. but it was using iounmap.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
hi,
just a small problem here.I could not build test this as I do not have a
MIPS crosscompiler.I know i should not send without a minimum build test,
but this change should not break the build (or maybe i am wrong)..
drivers/tty/serial/lantiq.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c
index 4675fe1..18c3844 100644
--- a/drivers/tty/serial/lantiq.c
+++ b/drivers/tty/serial/lantiq.c
@@ -497,8 +497,10 @@ lqasc_type(struct uart_port *port)
static void
lqasc_release_port(struct uart_port *port)
{
+ struct platform_device *pdev = to_platform_device(port->dev);
+
if (port->flags & UPF_IOREMAP) {
- iounmap(port->membase);
+ devm_iounmap(&pdev->dev, port->membase);
port->membase = NULL;
}
}
--
1.8.1.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-11-06 13:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-06 13:30 [PATCH] serial: MIPS: lantiq: use devm_iounmap instead of iounmap Sudip Mukherjee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®