diff options
author | Huang Shijie <b32955@freescale.com> | 2012-05-09 14:00:57 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2012-07-20 13:37:15 +0800 |
commit | 0fcb14a661001add7051a22245efc78b6571fba9 (patch) | |
tree | 79f30549b4352852ad2e88fbff6306ba01adfdb4 /drivers/tty | |
parent | 50a2ca9063ceb5b9b8cba5e4d46590deeb1af33f (diff) |
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 <b32955@freescale.com>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/mxc_uart_early.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |