From: Alexander Shiyan Date: Sun, 14 Oct 2012 07:05:29 +0000 (+0400) Subject: serial: clps711x: Fix break control handling X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ec335526b4bce21f6777d3917d6d67c16009ec63;p=linux-beck.git serial: clps711x: Fix break control handling Signed-off-by: Alexander Shiyan Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/clps711x.c b/drivers/tty/serial/clps711x.c index 7b0e539ee9c0..73505c1edc7d 100644 --- a/drivers/tty/serial/clps711x.c +++ b/drivers/tty/serial/clps711x.c @@ -218,12 +218,14 @@ static void clps711xuart_break_ctl(struct uart_port *port, int break_state) unsigned int ubrlcr; spin_lock_irqsave(&port->lock, flags); + ubrlcr = clps_readl(UBRLCR(port)); - if (break_state == -1) + if (break_state) ubrlcr |= UBRLCR_BREAK; else ubrlcr &= ~UBRLCR_BREAK; clps_writel(ubrlcr, UBRLCR(port)); + spin_unlock_irqrestore(&port->lock, flags); }