From: Andrew Morton Cc: Thomas Koeller Cc: Ralf Baechle Cc: Russell King Signed-off-by: Andrew Morton --- drivers/serial/8250.c | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff -puN drivers/serial/8250.c~rm9000-serial-driver-tidy drivers/serial/8250.c --- a/drivers/serial/8250.c~rm9000-serial-driver-tidy +++ a/drivers/serial/8250.c @@ -320,11 +320,19 @@ static const u8 [UART_SCR] = 0x2c }; -#define map_8250_in_reg(up, offset) \ - (((up)->port.iotype == UPIO_RM9000) ? regmap_in[offset] : (offset)) -#define map_8250_out_reg(up, offset) \ - (((up)->port.iotype == UPIO_RM9000) ? regmap_out[offset] : (offset)) +static inline int map_8250_in_reg(struct uart_8250_port *up, int offset) +{ + if (up->port.iotype != UPIO_RM9000) + return offset; + return regmap_in[offset]; +} +static inline int map_8250_out_reg(struct uart_8250_port *up, int offset) +{ + if (up->port.iotype != UPIO_RM9000) + return offset; + return regmap_out[offset]; +} #else _