diff options
author | Huang Shijie <b32955@freescale.com> | 2012-05-09 14:00:57 +0800 |
---|---|---|
committer | Xinyu Chen <xinyu.chen@freescale.com> | 2012-05-21 15:11:24 +0800 |
commit | ee2509e1ec49bc3b777d9a1d2ba191ed4bb32ed3 (patch) | |
tree | c686fe9081fccc303eb81a384c5c52e748c27878 /drivers | |
parent | 5978ebd2aaf42600253caffa392d53c74e9e8f2e (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')
-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); |