diff options
author | Stefan Agner <stefan@agner.ch> | 2018-11-14 16:37:12 +0100 |
---|---|---|
committer | Stefan Agner <stefan@agner.ch> | 2018-11-14 18:42:00 +0100 |
commit | 679ba38e5282065448c81aad3b2ba9057f53c7ac (patch) | |
tree | 79075130a036a646a8d911769df1c0a8dbfb0afb /drivers/tty/serial/imx.c | |
parent | 282a5f1c819bd54d0a58bfb2af63ed6efee5add3 (diff) |
serial: imx: avoid crash when un/re-binding serial console device
If the device used as a serial console gets un/re-binded, then
register_console() will call imx_uart_setup_console() again.
Drop __init so that imx_uart_setup_console() can be safely called
at runtime.
Signed-off-by: Stefan Agner <stefan@agner.ch>
Diffstat (limited to 'drivers/tty/serial/imx.c')
-rw-r--r-- | drivers/tty/serial/imx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index 757c91e5105a..674bd0ea2491 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -1966,7 +1966,7 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count) * If the port was already initialised (eg, by a boot loader), * try to determine the current setup. */ -static void __init +static void imx_uart_console_get_options(struct imx_port *sport, int *baud, int *parity, int *bits) { @@ -2025,7 +2025,7 @@ imx_uart_console_get_options(struct imx_port *sport, int *baud, } } -static int __init +static int imx_uart_console_setup(struct console *co, char *options) { struct imx_port *sport; |