On Thu, Mar 01, 2018 at 01:41:30PM +0200, Andy Shevchenko wrote: > dw8250_tx_wait_empty() uses direct byte I/O accessor while some ports > might prefer to use word, long or ever quad word access to the register. > > Unify the function in a way how it's done in dw8250_check_lsr(). > > Cc: Joshua Scott <joshua.scott@xxxxxxxxxxxxxxxxxxx> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> > --- > drivers/tty/serial/8250/8250_dw.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c > index 6fcdb90f616a..4ad67707a2cd 100644 > --- a/drivers/tty/serial/8250/8250_dw.c > +++ b/drivers/tty/serial/8250/8250_dw.c > @@ -121,12 +121,13 @@ static void dw8250_check_lcr(struct uart_port *p, int value) > } > > /* Returns once the transmitter is empty or we run out of retries */ > -static void dw8250_tx_wait_empty(struct uart_port *p, int tries) > +static void dw8250_tx_wait_empty(struct uart_port *p) > { > - unsigned int lsr; > + int tries = 1000; > > while (tries--) { > - lsr = readb (p->membase + (UART_LSR << p->regshift)); > + unsigned int lcr = p->serial_in(p, UART_LCR); > + > if (lsr & UART_LSR_TEMT) You obviously never even built this patch :( ugh, be more careful... greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html