diff options
author | Jeffy Chen <jeffy.chen@rock-chips.com> | 2017-07-18 14:02:54 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-30 07:38:50 -0700 |
commit | ac1e6965597d26cc1d16559b01261cbe1279ed00 (patch) | |
tree | f21849f15bd39644535d77faf2f08d198a98fee9 /drivers/tty/serial/arc_uart.c | |
parent | cbafe9d5c346735d6ac5d5c905fd9c215fbbb941 (diff) | |
download | linux-ac1e6965597d26cc1d16559b01261cbe1279ed00.tar.bz2 |
serial: arc: Remove __init marking from early write
The earlycon would be alive outside the init code in these cases:
1/ we have keep_bootcon in cmdline.
2/ we don't have a real console to switch to.
So remove the __init marking to avoid invalid memory access.
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/arc_uart.c')
-rw-r--r-- | drivers/tty/serial/arc_uart.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/arc_uart.c b/drivers/tty/serial/arc_uart.c index 5ac06fcaa9c6..77fe306690c4 100644 --- a/drivers/tty/serial/arc_uart.c +++ b/drivers/tty/serial/arc_uart.c @@ -549,8 +549,8 @@ static struct console arc_console = { .data = &arc_uart_driver }; -static __init void arc_early_serial_write(struct console *con, const char *s, - unsigned int n) +static void arc_early_serial_write(struct console *con, const char *s, + unsigned int n) { struct earlycon_device *dev = con->data; |