Skip to content

Commit

Permalink
serial: sifive: Fix sifive_serial_console_setup() section
Browse files Browse the repository at this point in the history
commit 9b8fef6 upstream.

This function is called indirectly from the platform driver probe
function. Even if the driver is built in, it may be probed after
free_initmem() due to deferral or unbinding/binding via sysfs.
Thus the function cannot be marked as __init.

Fixes: 45c054d ("tty: serial: add driver for the SiFive UART")
Cc: stable <stable@kernel.org>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20230624060159.3401369-1-samuel.holland@sifive.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
SiFiveHolland authored and gregkh committed Aug 3, 2023
1 parent ace0efe commit 71bef92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/sifive.c
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ static void sifive_serial_console_write(struct console *co, const char *s,
local_irq_restore(flags);
}

static int __init sifive_serial_console_setup(struct console *co, char *options)
static int sifive_serial_console_setup(struct console *co, char *options)
{
struct sifive_serial_port *ssp;
int baud = SIFIVE_DEFAULT_BAUD_RATE;
Expand Down

0 comments on commit 71bef92

Please sign in to comment.