Skip to content

Commit

Permalink
serial: arc: Remove __init marking from early write
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeffy Chen authored and Greg Kroah-Hartman committed Jul 30, 2017
1 parent cbafe9d commit ac1e696
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/tty/serial/arc_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit ac1e696

Please sign in to comment.