From bee18bdc9c0f383428cbf8c955b7bb8e6cc0d090 Mon Sep 17 00:00:00 2001 From: Alexander Shiyan Date: Sat, 24 May 2014 12:50:26 +0400 Subject: serial: sccnxp: Remove useless timer_pending() check sccnxp_timer() is triggered only by timer, so there are no need to check for timer_pending(). Signed-off-by: Alexander Shiyan Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/sccnxp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/tty/serial/sccnxp.c') diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c index a447f71538e..3f5d40a060e 100644 --- a/drivers/tty/serial/sccnxp.c +++ b/drivers/tty/serial/sccnxp.c @@ -474,9 +474,7 @@ static void sccnxp_timer(unsigned long data) sccnxp_handle_events(s); spin_unlock_irqrestore(&s->lock, flags); - if (!timer_pending(&s->timer)) - mod_timer(&s->timer, jiffies + - usecs_to_jiffies(s->pdata.poll_time_us)); + mod_timer(&s->timer, jiffies + usecs_to_jiffies(s->pdata.poll_time_us)); } static irqreturn_t sccnxp_ist(int irq, void *dev_id) -- cgit v1.2.3-70-g09d2 From 2ce7c148c8ddef52f18896cd11459d0de8a25c3f Mon Sep 17 00:00:00 2001 From: Alexander Shiyan Date: Sat, 24 May 2014 12:50:27 +0400 Subject: serial: sccnxp: Add IGNPAR flag handling This patch add IGNPAR flag handling for the driver. Signed-off-by: Alexander Shiyan Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/sccnxp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/tty/serial/sccnxp.c') diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c index 3f5d40a060e..5443b46345e 100644 --- a/drivers/tty/serial/sccnxp.c +++ b/drivers/tty/serial/sccnxp.c @@ -672,6 +672,8 @@ static void sccnxp_set_termios(struct uart_port *port, port->ignore_status_mask = 0; if (termios->c_iflag & IGNBRK) port->ignore_status_mask |= SR_BRK; + if (termios->c_iflag & IGNPAR) + port->ignore_status_mask |= SR_PE; if (!(termios->c_cflag & CREAD)) port->ignore_status_mask |= SR_PE | SR_OVR | SR_FE | SR_BRK; -- cgit v1.2.3-70-g09d2