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>
/*
- * 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
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);