aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/tty/serial/8250/8250_core.c15
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(
3134} 3134}
3135EXPORT_SYMBOL(serial8250_set_isa_configurator); 3135EXPORT_SYMBOL(serial8250_set_isa_configurator);
3136 3136
3137static void serial8250_init_port(struct uart_8250_port *up)
3138{
3139 struct uart_port *port = &up->port;
3140
3141 spin_lock_init(&port->lock);
3142 port->ops = &serial8250_pops;
3143
3144 up->cur_iotype = 0xFF;
3145}
3146
3137static void __init serial8250_isa_init_ports(void) 3147static void __init serial8250_isa_init_ports(void)
3138{ 3148{
3139 struct uart_8250_port *up; 3149 struct uart_8250_port *up;
@@ -3152,11 +3162,10 @@ static void __init serial8250_isa_init_ports(void)
3152 struct uart_port *port = &up->port; 3162 struct uart_port *port = &up->port;
3153 3163
3154 port->line = i; 3164 port->line = i;
3155 spin_lock_init(&port->lock); 3165 serial8250_init_port(up);
3156 3166
3157 init_timer(&up->timer); 3167 init_timer(&up->timer);
3158 up->timer.function = serial8250_timeout; 3168 up->timer.function = serial8250_timeout;
3159 up->cur_iotype = 0xFF;
3160 3169
3161 up->ops = &univ8250_driver_ops; 3170 up->ops = &univ8250_driver_ops;
3162 3171
@@ -3165,8 +3174,6 @@ static void __init serial8250_isa_init_ports(void)
3165 */ 3174 */
3166 up->mcr_mask = ~ALPHA_KLUDGE_MCR; 3175 up->mcr_mask = ~ALPHA_KLUDGE_MCR;
3167 up->mcr_force = ALPHA_KLUDGE_MCR; 3176 up->mcr_force = ALPHA_KLUDGE_MCR;
3168
3169 port->ops = &serial8250_pops;
3170 } 3177 }
3171 3178
3172 if (share_irqs) 3179 if (share_irqs)