]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
serial: sh-sci: Drop __initdata macro for port_cfg
authorClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Thu, 16 Jan 2025 18:22:45 +0000 (20:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:50:27 +0000 (12:50 +0100)
commit6b7947990681d42f6e35ab35ec9fa64eb64e5410
tree74ab4bcac37d931f19d78193e0f46039131fe9d2
parent2d09d3c9afa2fc422ac3df7c9b8534f350ee19dd
serial: sh-sci: Drop __initdata macro for port_cfg

commit eaeee4225dba30bef4d424bdf134a07b7f423e8b upstream.

The port_cfg object is used by serial_console_write(), which serves as
the write function for the earlycon device. Marking port_cfg as __initdata
causes it to be freed after kernel initialization, resulting in earlycon
becoming unavailable thereafter. Remove the __initdata macro from port_cfg
to resolve this issue.

Fixes: 0b0cced19ab1 ("serial: sh-sci: Add CONFIG_SERIAL_EARLYCON support")
Cc: stable@vger.kernel.org
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Fixes: 0b0cced19ab15c9e ("serial: sh-sci: Add CONFIG_SERIAL_EARLYCON support")
Link: https://lore.kernel.org/r/20250116182249.3828577-2-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sh-sci.c