Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit da7ebd86 authored by Samuel Holland's avatar Samuel Holland Committed by Greg Kroah-Hartman
Browse files

serial: sifive: Fix sifive_serial_console_setup() section



commit 9b8fef6345d5487137d4193bb0a0eae2203c284e 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: 45c054d0 ("tty: serial: add driver for the SiFive UART")
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarSamuel Holland <samuel.holland@sifive.com>
Link: https://lore.kernel.org/r/20230624060159.3401369-1-samuel.holland@sifive.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d674cb90
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -821,7 +821,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;