]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00182346-2 serial: unregister the console when the console is released
authorHuang Shijie <b32955@freescale.com>
Wed, 9 May 2012 06:00:57 +0000 (14:00 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:35 +0000 (08:34 +0200)
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>
drivers/tty/serial/mxc_uart_early.c

index c970dc6593cdbd49aca6bd101a97bcd78140a553..4a4518fa67e1f827b9eb4228d7e077047175714c 100644 (file)
@@ -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);