]> git.karo-electronics.de Git - linux-beck.git/commitdiff
serial: MIPS: lantiq: use devm_iounmap instead of iounmap
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Thu, 6 Nov 2014 13:30:42 +0000 (19:00 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Nov 2014 23:01:03 +0000 (15:01 -0800)
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>
drivers/tty/serial/lantiq.c

index 4675fe198d31a625498dc43dfd0dfea72ed7faad..18c3844510ff7c6b7b754f8fe3d2d4d0af737e00 100644 (file)
@@ -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;
        }
 }