diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2015-02-24 14:25:08 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-26 18:17:35 +0100 |
commit | 0a16e2c1a6221703aa4d4942c95e37d641e87cc7 (patch) | |
tree | 253038ca1ee7037ef265d17e1d38f4e2abe3b1af /drivers/tty/serial | |
parent | a4416cd1ac7b48988f0f41a17769d65c71ffc504 (diff) |
serial: 8250: Separate port initialization
Prepare for 8250 split; introduce serial8250_init_port() to initialize
port fields uncoupled from port structure storage.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/8250/8250_core.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index 06bb2ced2c94..e59fd1dc1ad5 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -3134,6 +3134,16 @@ void serial8250_set_isa_configurator( } EXPORT_SYMBOL(serial8250_set_isa_configurator); +static void serial8250_init_port(struct uart_8250_port *up) +{ + struct uart_port *port = &up->port; + + spin_lock_init(&port->lock); + port->ops = &serial8250_pops; + + up->cur_iotype = 0xFF; +} + static void __init serial8250_isa_init_ports(void) { struct uart_8250_port *up; @@ -3152,11 +3162,10 @@ static void __init serial8250_isa_init_ports(void) struct uart_port *port = &up->port; port->line = i; - spin_lock_init(&port->lock); + serial8250_init_port(up); init_timer(&up->timer); up->timer.function = serial8250_timeout; - up->cur_iotype = 0xFF; up->ops = &univ8250_driver_ops; @@ -3165,8 +3174,6 @@ static void __init serial8250_isa_init_ports(void) */ up->mcr_mask = ~ALPHA_KLUDGE_MCR; up->mcr_force = ALPHA_KLUDGE_MCR; - - port->ops = &serial8250_pops; } if (share_irqs) |