lkml.org 
[lkml]   [2014]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/15] tty: serial: 8250_core: add run time pm
Hi,

On Fri, Aug 15, 2014 at 07:42:31PM +0200, Sebastian Andrzej Siewior wrote:
> --- a/drivers/tty/serial/8250/8250_core.c
> +++ b/drivers/tty/serial/8250/8250_core.c
> @@ -1899,12 +1984,22 @@ static void wait_for_xmitr(struct uart_8250_port *up, int bits)
>
> static int serial8250_get_poll_char(struct uart_port *port)
> {
> - unsigned char lsr = serial_port_in(port, UART_LSR);
> + unsigned char lsr;
> + int status;
> +
> + serial8250_rpm_get(up);

or up won't be defined below. You probably need
+ struct uart_8250_port *up = up_to_u8250p(port);
somewhere in there.

> - if (!(lsr & UART_LSR_DR))
> - return NO_POLL_CHAR;
> + lsr = serial_port_in(port, UART_LSR);
>
> - return serial_port_in(port, UART_RX);
> + if (!(lsr & UART_LSR_DR)) {
> + status = NO_POLL_CHAR;
> + goto out;
> + }
> +
> + status = serial_port_in(port, UART_RX);
> +out:
> + serial8250_rpm_put(up);
> + return status;
> }

Cheers,
Frans


\
 
 \ /
  Last update: 2014-08-20 11:41    [W:0.210 / U:3.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site