]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
serial: sifive: Fix sifive_serial_console_setup() section
authorSamuel Holland <samuel.holland@sifive.com>
Sat, 24 Jun 2023 06:01:59 +0000 (23:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Aug 2023 08:22:41 +0000 (10:22 +0200)
commitb800c0d5576e4485da23554ed0a835df20cde646
tree45208d6d2954155c21c560eabdd39db8fc706b03
parent8fa462ad0f9b24ec538e3725fd87adb5babddf4b
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: 45c054d0815b ("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>
drivers/tty/serial/sifive.c