Skip to content

Commit

Permalink
serial: fix 8250 early console setup
Browse files Browse the repository at this point in the history
the early setup function serial8250_console_early_setup() can be called
from non __init code (eg. hotpluggable serial ports like serial_cs) so
remove the __init from the call chain to avoid crashes.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Daniel Ritz authored and Linus Torvalds committed Aug 3, 2007
1 parent 1a3f2ea commit b6b1d87
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/serial/8250.c
Original file line number Diff line number Diff line change
Expand Up @@ -2514,7 +2514,7 @@ static int __init serial8250_console_setup(struct console *co, char *options)
return uart_set_options(port, co, baud, parity, bits, flow);
}

static int __init serial8250_console_early_setup(void)
static int serial8250_console_early_setup(void)
{
return serial8250_find_port_for_earlycon();
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/serial/8250_early.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ int __init setup_early_serial8250_console(char *cmdline)
return 0;
}

int __init serial8250_find_port_for_earlycon(void)
int serial8250_find_port_for_earlycon(void)
{
struct early_serial8250_device *device = &early_device;
struct uart_port *port = &device->port;
Expand Down
2 changes: 1 addition & 1 deletion kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ int __init add_preferred_console(char *name, int idx, char *options)
return 0;
}

int __init update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options)
int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options)
{
struct console_cmdline *c;
int i;
Expand Down

0 comments on commit b6b1d87

Please sign in to comment.