Skip to content

Commit f7a676a

Browse files
andy-shevgregkh
authored andcommitted
serial: 8520_ce4100: Reuse mem_serial_in() in ce4100_mem_serial_in()
In one place in ce4100_mem_serial_in() the code may be replaced with mem_serial_in() call. Do it so and collapse two conditionals into one. Suggested-by: Jiri Slaby <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Jiri Slaby <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0c8a3a2 commit f7a676a

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

drivers/tty/serial/8250/8250_ce4100.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,8 @@ static u32 ce4100_mem_serial_in(struct uart_port *p, unsigned int offset)
3535
{
3636
u32 ret, ier, lsr;
3737

38-
if (offset != UART_IIR)
39-
return mem_serial_in(p, offset);
40-
41-
offset <<= p->regshift;
42-
43-
ret = readl(p->membase + offset);
44-
if (!(ret & UART_IIR_NO_INT))
38+
ret = mem_serial_in(p, offset);
39+
if (offset != UART_IIR || !(ret & UART_IIR_NO_INT))
4540
return ret;
4641

4742
/* see if the TX interrupt should have really set */

0 commit comments

Comments
 (0)