Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00b28ae0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge " msm_serial_hs_lite : Prevent pushing extra bytes to the top layer"

parents 2d954b05 6b796ba3
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -2,7 +2,7 @@
 * drivers/serial/msm_serial.c - driver for msm7k serial device and console
 * drivers/serial/msm_serial.c - driver for msm7k serial device and console
 *
 *
 * Copyright (C) 2007 Google, Inc.
 * Copyright (C) 2007 Google, Inc.
 * Copyright (c) 2010-2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2010-2016, The Linux Foundation. All rights reserved.
 *
 *
 * This software is licensed under the terms of the GNU General Public
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * License version 2, as published by the Free Software Foundation, and
@@ -554,6 +554,7 @@ static void handle_rx(struct uart_port *port, unsigned int misr)
	unsigned int vid;
	unsigned int vid;
	unsigned int sr;
	unsigned int sr;
	int count = 0;
	int count = 0;
	int copied = 0;
	struct msm_hsl_port *msm_hsl_port = UART_TO_MSM(port);
	struct msm_hsl_port *msm_hsl_port = UART_TO_MSM(port);


	vid = msm_hsl_port->ver_id;
	vid = msm_hsl_port->ver_id;
@@ -609,9 +610,9 @@ static void handle_rx(struct uart_port *port, unsigned int misr)


		/* TODO: handle sysrq */
		/* TODO: handle sysrq */
		/* if (!uart_handle_sysrq_char(port, c)) */
		/* if (!uart_handle_sysrq_char(port, c)) */
		tty_insert_flip_string(tty->port, (char *) &c,
		copied = tty_insert_flip_string(tty->port, (char *) &c,
				       (count > 4) ? 4 : count);
				       (count > 4) ? 4 : count);
		count -= 4;
		count -= copied;
	}
	}


	tty_flip_buffer_push(tty->port);
	tty_flip_buffer_push(tty->port);