Skip to content

Commit

Permalink
serial: uartps: console_setup() can't be placed to init section
Browse files Browse the repository at this point in the history
When console device is rebinded, console_setup() is called again.
But marking it as __init means that function will be clear after boot is
complete. If console device is binded again console_setup() is not found
and error "Unable to handle kernel paging request at virtual address"
is reported.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Michal Simek authored and Greg Kroah-Hartman committed Sep 18, 2018
1 parent 8baf906 commit 4bb1ce2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/xilinx_uartps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ static void cdns_uart_console_write(struct console *co, const char *s,
*
* Return: 0 on success, negative errno otherwise.
*/
static int __init cdns_uart_console_setup(struct console *co, char *options)
static int cdns_uart_console_setup(struct console *co, char *options)
{
struct uart_port *port = console_port;

Expand Down

0 comments on commit 4bb1ce2

Please sign in to comment.