Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: manually inline serial8250_handle_port

Currently serial8250_handle_irq is a trivial wrapper around
serial8250_handle_port, which actually does all the work.

Since there are no other callers of serial8250_handle_port, we
can just move it inline into serial8250_handle_irq. This also
makes it more clear what functionality any custom IRQ handlers
need to provide if not using serial8250_default_handle_irq.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Paul Gortmaker and committed by
Greg Kroah-Hartman
86b21199 a0431476

+8 -15
+8 -15
drivers/tty/serial/8250.c
··· 1528 1528 /* 1529 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 1533 unsigned char status; 1534 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 1541 spin_lock_irqsave(&up->port.lock, flags); 1537 1542 ··· 1551 1546 serial8250_tx_chars(up); 1552 1547 1553 1548 spin_unlock_irqrestore(&up->port.lock, flags); 1554 - } 1555 - 1556 - int serial8250_handle_irq(struct uart_port *port, unsigned int iir) 1557 - { 1558 - struct uart_8250_port *up = 1559 - container_of(port, struct uart_8250_port, port); 1560 - 1561 - if (!(iir & UART_IIR_NO_INT)) { 1562 - serial8250_handle_port(up); 1563 - return 1; 1564 - } 1565 - 1566 - return 0; 1549 + return 1; 1567 1550 } 1568 1551 EXPORT_SYMBOL_GPL(serial8250_handle_irq); 1569 1552 ··· 2820 2827 2821 2828 local_irq_save(flags); 2822 2829 if (up->port.sysrq) { 2823 - /* serial8250_handle_port() already took the lock */ 2830 + /* serial8250_handle_irq() already took the lock */ 2824 2831 locked = 0; 2825 2832 } else if (oops_in_progress) { 2826 2833 locked = spin_trylock(&up->port.lock);