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 <jirislaby@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20250701134200.2621898-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
{
u32 ret, ier, lsr;
- if (offset != UART_IIR)
- return mem_serial_in(p, offset);
-
- offset <<= p->regshift;
-
- ret = readl(p->membase + offset);
- if (!(ret & UART_IIR_NO_INT))
+ ret = mem_serial_in(p, offset);
+ if (offset != UART_IIR || !(ret & UART_IIR_NO_INT))
return ret;
/* see if the TX interrupt should have really set */