summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFiro Yang <firogm@gmail.com>2015-04-26 18:46:06 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-06 22:27:02 +0200
commitc547630f6b5cfebf211b313d7c1f54794ac013f0 (patch)
treeb9771302753190c6ef3b397d7783d87ee3f9aabd
parenteda0cd3546ab2c69796ea0bfdc04723c74372f1d (diff)
downloadop-kernel-dev-c547630f6b5cfebf211b313d7c1f54794ac013f0.zip
op-kernel-dev-c547630f6b5cfebf211b313d7c1f54794ac013f0.tar.gz
ARM: meson: serial: convert iounmap to devm_iounmap
The function meson_uart_release_port() inappropriately try to iounmap() a resource managed by devm_ioremap_nocache(). The function meson_uart_release_port() maybe called by uart_ioctl() that means meson_uart_release_port() is not called from within a probe or remove function, for safety, I convert iounmap() to devm_iounmap(). Signed-off-by: Firo Yang <firogm@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/meson_uart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c
index 67c0367..0fc83c9 100644
--- a/drivers/tty/serial/meson_uart.c
+++ b/drivers/tty/serial/meson_uart.c
@@ -370,7 +370,7 @@ static int meson_uart_verify_port(struct uart_port *port,
static void meson_uart_release_port(struct uart_port *port)
{
if (port->flags & UPF_IOREMAP) {
- iounmap(port->membase);
+ devm_iounmap(port->dev, port->membase);
port->membase = NULL;
}
}
OpenPOWER on IntegriCloud