Skip to content

Commit

Permalink
[SERIAL] Add comment about early_serial_setup()
Browse files Browse the repository at this point in the history
early_serial_setup() must not be called after console initialisation.
Add a comment prior to the function explicitly stating this.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King authored and Russell King committed Feb 23, 2006
1 parent 85edae1 commit d856c66
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/serial/8250.c
Expand Up @@ -2326,6 +2326,12 @@ static struct uart_driver serial8250_reg = {
.cons = SERIAL8250_CONSOLE,
};

/*
* early_serial_setup - early registration for 8250 ports
*
* Setup an 8250 port structure prior to console initialisation. Use
* after console initialisation will cause undefined behaviour.
*/
int __init early_serial_setup(struct uart_port *port)
{
if (port->line >= ARRAY_SIZE(serial8250_ports))
Expand Down

0 comments on commit d856c66

Please sign in to comment.