diff options
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/8250.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c index f1c4f4575426..9f50c4e3c2be 100644 --- a/drivers/tty/serial/8250.c +++ b/drivers/tty/serial/8250.c | |||
@@ -1528,10 +1528,15 @@ EXPORT_SYMBOL_GPL(serial8250_modem_status); | |||
1528 | /* | 1528 | /* |
1529 | * This handles the interrupt from one port. | 1529 | * This handles the interrupt from one port. |
1530 | */ | 1530 | */ |
1531 | static void serial8250_handle_port(struct uart_8250_port *up) | 1531 | int serial8250_handle_irq(struct uart_port *port, unsigned int iir) |
1532 | { | 1532 | { |
1533 | unsigned char status; | 1533 | unsigned char status; |
1534 | unsigned long flags; | 1534 | unsigned long flags; |
1535 | struct uart_8250_port *up = | ||
1536 | container_of(port, struct uart_8250_port, port); | ||
1537 | |||
1538 | if (iir & UART_IIR_NO_INT) | ||
1539 | return 0; | ||
1535 | 1540 | ||
1536 | spin_lock_irqsave(&up->port.lock, flags); | 1541 | spin_lock_irqsave(&up->port.lock, flags); |
1537 | 1542 | ||
@@ -1546,19 +1551,7 @@ static void serial8250_handle_port(struct uart_8250_port *up) | |||
1546 | serial8250_tx_chars(up); | 1551 | serial8250_tx_chars(up); |
1547 | 1552 | ||
1548 | spin_unlock_irqrestore(&up->port.lock, flags); | 1553 | spin_unlock_irqrestore(&up->port.lock, flags); |
1549 | } | 1554 | return 1; |
1550 | |||
1551 | int serial8250_handle_irq(struct uart_port *port, unsigned int iir) | ||
1552 | { | ||
1553 | struct uart_8250_port *up = | ||
1554 | container_of(port, struct uart_8250_port, port); | ||
1555 | |||
1556 | if (!(iir & UART_IIR_NO_INT)) { | ||
1557 | serial8250_handle_port(up); | ||
1558 | return 1; | ||
1559 | } | ||
1560 | |||
1561 | return 0; | ||
1562 | } | 1555 | } |
1563 | EXPORT_SYMBOL_GPL(serial8250_handle_irq); | 1556 | EXPORT_SYMBOL_GPL(serial8250_handle_irq); |
1564 | 1557 | ||
@@ -2827,7 +2820,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) | |||
2827 | 2820 | ||
2828 | local_irq_save(flags); | 2821 | local_irq_save(flags); |
2829 | if (up->port.sysrq) { | 2822 | if (up->port.sysrq) { |
2830 | /* serial8250_handle_port() already took the lock */ | 2823 | /* serial8250_handle_irq() already took the lock */ |
2831 | locked = 0; | 2824 | locked = 0; |
2832 | } else if (oops_in_progress) { | 2825 | } else if (oops_in_progress) { |
2833 | locked = spin_trylock(&up->port.lock); | 2826 | locked = spin_trylock(&up->port.lock); |