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

Commit dd076cff authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Greg Kroah-Hartman
Browse files

serial: sh-sci: Fix init data attribute for struct 'port_cfg'



The __init attribute is meant to mark functions, use __initdata instead
for the data structure.

This fixes the following error when building with clang:

drivers/tty/serial/sh-sci.c:3247:15: error: '__section__' attribute only
  applies to functions, methods, properties, and global variables
    static struct __init plat_sci_port port_cfg;

Signed-off-by: default avatarMatthias Kaehlcke <mka@chromium.org>
Reviewed-by: default avatarGuenter Roeck <groeck@chromium.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6e605a01
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3273,7 +3273,7 @@ early_platform_init_buffer("earlyprintk", &sci_driver,
			   early_serial_buf, ARRAY_SIZE(early_serial_buf));
#endif
#ifdef CONFIG_SERIAL_SH_SCI_EARLYCON
static struct __init plat_sci_port port_cfg;
static struct plat_sci_port port_cfg __initdata;

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