From dc557be9d0854227c75b5525ff0d622631d4d4c9 Mon Sep 17 00:00:00 2001 From: Huang Shijie Date: Wed, 9 May 2012 14:00:57 +0800 Subject: [PATCH] ENGR00182346-2 serial: unregister the console when the console is released The old code does not unregister the console mxc_early_uart_console when it is disabled. This may causes the global console `console_drivers` still pointes an invalid console mxc_early_uart_console. A hung will be observed in this situation. Signed-off-by: Huang Shijie --- drivers/tty/serial/mxc_uart_early.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/mxc_uart_early.c b/drivers/tty/serial/mxc_uart_early.c index c970dc6593cd..4a4518fa67e1 100644 --- a/drivers/tty/serial/mxc_uart_early.c +++ b/drivers/tty/serial/mxc_uart_early.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Freescale Semiconductor, Inc. + * Copyright (C) 2011-2012 Freescale Semiconductor, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -181,6 +181,7 @@ int __init mxc_early_uart_console_disable(void) struct uart_port *port = &device->port; if (mxc_early_uart_console.index >= 0) { + unregister_console(&mxc_early_uart_console); iounmap(port->membase); clk_disable(device->clk); clk_put(device->clk); -- 2.39.5