[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230624060159.3401369-1-samuel.holland@sifive.com>
Date: Fri, 23 Jun 2023 23:01:59 -0700
From: Samuel Holland <samuel.holland@...ive.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Samuel Holland <samuel.holland@...ive.com>,
Jiri Slaby <jirislaby@...nel.org>,
Palmer Dabbelt <palmer@...belt.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org,
linux-serial@...r.kernel.org
Subject: [PATCH] serial: sifive: Fix sifive_serial_console_setup() section
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")
Signed-off-by: Samuel Holland <samuel.holland@...ive.com>
---
drivers/tty/serial/sifive.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/sifive.c b/drivers/tty/serial/sifive.c
index 1f565a216e74..a19db49327e2 100644
--- a/drivers/tty/serial/sifive.c
+++ b/drivers/tty/serial/sifive.c
@@ -811,7 +811,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;
--
2.40.1
Powered by blists - more mailing lists