aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/serial/8250.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index ce948b66bbd4..27f34a9f9cb7 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1874,7 +1874,9 @@ static int serial8250_startup(struct uart_port *port)
1874 * the interrupt is enabled. Delays are necessary to 1874 * the interrupt is enabled. Delays are necessary to
1875 * allow register changes to become visible. 1875 * allow register changes to become visible.
1876 */ 1876 */
1877 spin_lock_irqsave(&up->port.lock, flags); 1877 spin_lock(&up->port.lock);
1878 if (up->port.flags & UPF_SHARE_IRQ)
1879 disable_irq_nosync(up->port.irq);
1878 1880
1879 wait_for_xmitr(up, UART_LSR_THRE); 1881 wait_for_xmitr(up, UART_LSR_THRE);
1880 serial_out_sync(up, UART_IER, UART_IER_THRI); 1882 serial_out_sync(up, UART_IER, UART_IER_THRI);
@@ -1886,7 +1888,9 @@ static int serial8250_startup(struct uart_port *port)
1886 iir = serial_in(up, UART_IIR); 1888 iir = serial_in(up, UART_IIR);
1887 serial_out(up, UART_IER, 0); 1889 serial_out(up, UART_IER, 0);
1888 1890
1889 spin_unlock_irqrestore(&up->port.lock, flags); 1891 if (up->port.flags & UPF_SHARE_IRQ)
1892 enable_irq(up->port.irq);
1893 spin_unlock(&up->port.lock);
1890 1894
1891 /* 1895 /*
1892 * If the interrupt is not reasserted, setup a timer to 1896 * If the interrupt is not reasserted, setup a timer to