summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>2014-11-06 19:00:42 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-06 15:01:03 -0800
commit1511316fbd1c690ad0a16324d88fb5ec45d6be36 (patch)
tree3f9fa6efcbf64008f8c0cb18f55ebf1834505a0f /drivers
parentb1835d238ad3dc6ad8fe23172b1995d1fb5bdd39 (diff)
downloadlinux-stable-1511316fbd1c690ad0a16324d88fb5ec45d6be36.tar.gz
linux-stable-1511316fbd1c690ad0a16324d88fb5ec45d6be36.tar.bz2
linux-stable-1511316fbd1c690ad0a16324d88fb5ec45d6be36.zip
serial: MIPS: lantiq: use devm_iounmap instead of iounmap
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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/lantiq.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/tty/serial/lantiq.c b/drivers/tty/serial/lantiq.c
index 4675fe198d31..18c3844510ff 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;
}
}