Skip to content

Commit eaeee42

Browse files
claudiubezneagregkh
authored andcommitted
serial: sh-sci: Drop __initdata macro for port_cfg
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: 0b0cced ("serial: sh-sci: Add CONFIG_SERIAL_EARLYCON support") Cc: [email protected] Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Claudiu Beznea <[email protected]> Fixes: 0b0cced ("serial: sh-sci: Add CONFIG_SERIAL_EARLYCON support") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 39d0be8 commit eaeee42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/tty/serial/sh-sci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3562,7 +3562,7 @@ sh_early_platform_init_buffer("earlyprintk", &sci_driver,
35623562
early_serial_buf, ARRAY_SIZE(early_serial_buf));
35633563
#endif
35643564
#ifdef CONFIG_SERIAL_SH_SCI_EARLYCON
3565-
static struct plat_sci_port port_cfg __initdata;
3565+
static struct plat_sci_port port_cfg;
35663566

35673567
static int __init early_console_setup(struct earlycon_device *device,
35683568
int type)

0 commit comments

Comments
 (0)