Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753847AbbHQHWs (ORCPT ); Mon, 17 Aug 2015 03:22:48 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:35261 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750894AbbHQHWr (ORCPT ); Mon, 17 Aug 2015 03:22:47 -0400 From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu Cc: Anirudha Sarangi , =?UTF-8?q?S=C3=B6ren=20Brinkmann?= , Jiri Slaby , linux-serial@vger.kernel.org, Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/4] serial: xuartps: Fix termios issue for enabling odd parity Date: Mon, 17 Aug 2015 09:22:31 +0200 Message-Id: <5b154ba97bcd79e49e2131152eb2fc1761594a6c.1439796149.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.3.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1163 Lines: 33 From: Anirudha Sarangi Existing set_termios does not handle the option for enabling odd parity. This patch fixes it. Signed-off-by: Anirudha Sarangi Signed-off-by: Michal Simek --- drivers/tty/serial/xilinx_uartps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index 009e0dbc12d2..a3020344ac9d 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -723,7 +723,7 @@ static void cdns_uart_set_termios(struct uart_port *port, else cval |= CDNS_UART_MR_STOPMODE_1_BIT; /* 1 STOP bit */ - if (termios->c_cflag & PARENB) { + if ((termios->c_cflag & PARENB) || (termios->c_cflag & PARODD)) { /* Mark or Space parity */ if (termios->c_cflag & CMSPAR) { if (termios->c_cflag & PARODD) -- 2.3.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/