From: Sudip Mukherjee Date: Thu, 6 Nov 2014 13:30:42 +0000 (+0530) Subject: serial: MIPS: lantiq: use devm_iounmap instead of iounmap X-Git-Tag: firefly_0821_release~176^2~2678^2~54 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1511316fbd1c690ad0a16324d88fb5ec45d6be36;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Greg Kroah-Hartman --- 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; } }