From: Huang Shijie Date: Wed, 9 May 2012 06:00:57 +0000 (+0800) Subject: ENGR00182346-2 serial: unregister the console when the console is released X-Git-Tag: v3.0.35-fsl~1068 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=dc557be9d0854227c75b5525ff0d622631d4d4c9;p=karo-tx-linux.git 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 --- 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);